Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package monitoring-plugins-keepalived for 
openSUSE:Factory checked in at 2026-09-01 15:52:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-keepalived (Old)
 and      /work/SRC/openSUSE:Factory/.monitoring-plugins-keepalived.new.1265 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "monitoring-plugins-keepalived"

Tue Sep  1 15:52:11 2026 rev:2 rq:1375133 version:0.1.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/monitoring-plugins-keepalived/monitoring-plugins-keepalived.changes
      2018-08-20 16:21:27.340994994 +0200
+++ 
/work/SRC/openSUSE:Factory/.monitoring-plugins-keepalived.new.1265/monitoring-plugins-keepalived.changes
    2026-09-01 15:52:59.908472968 +0200
@@ -1,0 +2,6 @@
+Tue Aug 25 12:16:54 UTC 2026 - Ruediger Oertel <[email protected]>
+
+- add a "-n" option to actually use the state file written by
+  keepalived_notify_monitoring.conf
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ monitoring-plugins-keepalived.spec ++++++
--- /var/tmp/diff_new_pack.ZrcuNh/_old  2026-09-01 15:53:02.089549061 +0200
+++ /var/tmp/diff_new_pack.ZrcuNh/_new  2026-09-01 15:53:02.094549235 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package monitoring-plugins-keepalived
 #
-# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -21,8 +21,8 @@
 License:        BSD-3-Clause
 Group:          System/Monitoring
 Version:        0.1.5
-Release:        1
-Url:            https://en.opensuse.org/Monitoring-plugins-keepalived
+Release:        0
+URL:            https://en.opensuse.org/Monitoring-plugins-keepalived
 Source0:        check_keepalived
 Source1:        keepalived_notify_monitoring.sh
 Source2:        monitoring-plugins-keepalived-rpmlintrc

++++++ check_keepalived ++++++
--- /var/tmp/diff_new_pack.ZrcuNh/_old  2026-09-01 15:53:02.170551887 +0200
+++ /var/tmp/diff_new_pack.ZrcuNh/_new  2026-09-01 15:53:02.186552445 +0200
@@ -40,6 +40,7 @@
 STATE='UNKOWN - no data processed'
 PROGPATH='/usr/lib/nagios/plugins/'
 USE_SNMP=false
+USE_NOTIFICATION=false
 SNMP_VERSION='2c'
 SNMP_HOSTNAME='localhost'
 SNMP_COMMUNITY='public'
@@ -62,6 +63,7 @@
     echo "       -h                      : print this usage"
     echo "       -V                      : print version information"
     echo "       -s                      : use SNMP"
+    echo "       -n                      : use notification file"
     echo "       -H <hostname>           : SNMP host to query"
     echo "       -v <snmp_version>       : SNMP version (currently only 2c is 
supported, therefor default)"
     echo "       -c <snmp_community>     : SNMP v2 community string"
@@ -91,7 +93,7 @@
     exit $STATE_OK
 }
 
-while getopts 'F:p:SMhVv:sH:c:' OPTION ; do
+while getopts 'F:p:SMhVv:snH:c:' OPTION ; do
     case $OPTION in
         v|V)
             print_revision $PROGNAME $REVISION
@@ -116,6 +118,9 @@
         s)
             USE_SNMP=true
         ;;
+        n)
+            USE_NOTIFICATION=true
+        ;;
         H)
             SNMP_HOSTNAME="$OPTARG"
         ;;
@@ -199,6 +204,49 @@
                fi
        fi
 
+  elif [ "$USE_NOTIFICATION" == "true" ] ; then
+    if [ -r "$STATEFILE" ] ; then
+        STATE1=$(grep "in MASTER state" "$STATEFILE")
+        STATE2=$(grep "in BACKUP state" "$STATEFILE")
+        STATE3=$(grep "in FAULT state" "$STATEFILE")
+        STATE4=$(grep "in STOP state" "$STATEFILE")
+    else
+        echo "UNKOWN: could not read $STATEFILE"
+        exit $STATE_UNKNOWN
+    fi
+    if [ -n "$STATE3" -o -n "$STATE4" ] ;then
+        echo "$STATE3 $STATE4"
+        exit $STATE_CRITICAL
+    fi
+
+    if [ "$MASTER" == "true" ]; then
+        if [ -n "$STATE1" ]; then
+            echo "OK: $STATE1 $STATE2"
+            exit $STATE_OK
+        elif [ -n "$STATE2" ]; then
+            echo "CRIT: $STATE1 $STATE2 is not master"
+            exit $STATE_CRITICAL
+        fi
+    elif [ "$SLAVE" == "true" ]; then
+        if [ -n "$STATE2" ]; then
+            echo "OK: $STATE1 $STATE2"
+            exit $STATE_OK
+        elif [ -n "$STATE1" ]; then
+            echo "CRIT: $STATE1 $STATE2 is not slave"
+            exit $STATE_CRITICAL
+       else
+            echo "UNKOWN: could not detect state from $STATEFILE : $STATE1 
$STATE2"
+            exit $STATE_UNKNOWN
+        fi
+    else
+        if [ -n "$STATE1" -o -n "$STATE2" ]; then
+            echo "OK: $STATE1 $STATE2"
+            exit $STATE_OK
+       else
+            echo "UNKOWN: could not detect state from $STATEFILE : $STATE1 
$STATE2"
+            exit $STATE_UNKNOWN
+        fi
+    fi
   else
     rm -f $STATEFILE
     kill -USR2 $PID

Reply via email to