Hello community,

here is the log from the commit of package nagios-plugins for openSUSE:Factory 
checked in at 2012-05-07 22:48:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nagios-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.nagios-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nagios-plugins", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nagios-plugins/nagios-plugins.changes    
2012-03-08 19:44:17.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nagios-plugins.new/nagios-plugins.changes       
2012-05-07 22:48:37.000000000 +0200
@@ -1,0 +2,52 @@
+Fri Apr 27 16:23:47 UTC 2012 - [email protected]
+
+- fix build on ix86
+- only recommend subpackages that have new (and not always available
+  dependencies)
+- move examples directory to the libs package: the permissions 
+  file there is more useful here
+- new subpackage nagios-plugins-all recommending all other 
+  subpackages
+
+-------------------------------------------------------------------
+Thu Apr 26 10:23:18 UTC 2012 - [email protected]
+
+- do not package check_xenvm on ix86 as this setup is (no longer)
+  supported 
+
+-------------------------------------------------------------------
+Wed Apr 25 07:24:33 UTC 2012 - [email protected]
+
+- added nagios-plugins-enhance_check_sensors.patch (thanks to 
+  Craig Gardner): return unkown if the needed kernel module 
+  is not loaded
+
+-------------------------------------------------------------------
+Mon Apr 23 16:30:09 UTC 2012 - [email protected]
+
+- introduce a new subpackage nagios-plugins-libs that contains 
+  most of the content of the former nagios-plugins package. That 
+  should make updates easier as the nagios-plugins package itself
+  can now require all former included packages and the single 
+  check-packages just need to require the nagios-plugins-libs 
+  package on demand
+- change recommends to requires in nagios-plugins and 
+  nagios-plugins-extras, so users with 'solver.onlyRequires'=true
+  can also upgrade to the new package layout without problems
+- provide the nagios-plugins-xenvm package only for x86 hardware 
+  as the required xen-tools are just built there
+
+-------------------------------------------------------------------
+Tue Apr 17 18:58:38 UTC 2012 - [email protected]
+
+- update README.SuSE as users should also allow broadcasts in their
+  firewall if they use check_dhcp (thanks to RĂ¼diger Oertel)
+- split up the checks into subpackages to follow the other 
+  distributions and allow users to install a minimal setup on their
+  machines with minimal dependencies (moved dependencies into 
+  subpackages)
+- run set_permissions on newer distributions
+- added nagios-plugins-wrong_return_in_check_swap.patch:
+  preventing check_swap from returning OK, if no swap activated
+
+-------------------------------------------------------------------

New:
----
  nagios-plugins-README.SuSE-check_dhcp
  nagios-plugins-README.SuSE-check_icmp
  nagios-plugins-README.SuSE-check_ide_smart
  nagios-plugins-enhance_check_sensors.patch
  nagios-plugins-wrong_return_in_check_swap.patch

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

Other differences:
------------------
++++++ nagios-plugins.spec ++++++
++++ 1275 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/nagios-plugins/nagios-plugins.spec
++++ and /work/SRC/openSUSE:Factory/.nagios-plugins.new/nagios-plugins.spec

++++++ nagios-plugins-README.SuSE ++++++
--- /var/tmp/diff_new_pack.iDVDBv/_old  2012-05-07 22:48:39.000000000 +0200
+++ /var/tmp/diff_new_pack.iDVDBv/_new  2012-05-07 22:48:39.000000000 +0200
@@ -11,71 +11,4 @@
 
 All plugins are installed in ''/usr/lib/nagios/plugins/'' on every 
architecture. 
 
-== Plugins needing special privileges ==
-
-There are at least three check scripts that need root privileges to run:
-* check_dhcp
-* check_icmp
-* check_ide_smart
-
-To be "safe per default", SuSE doesn't install these plugins with the 
-suid bit set. There are two recommended ways about overriding this on 
-your system:
-
-== check_dhcp ==
-
-If you run the check_dhcp script on the server, please make sure your 
-UDP ports 67 and 68 on the _client_ are opened in the firewall. Otherwise 
-the script will be unable to detect anything.
-
-=== Set the suid bit ===
-
-Note: Please choose only those examples you need.
-* change the group ownership to the users primary group that executes  this 
check (normally nagios):
-
-    chgrp nagios /usr/lib/nagios/plugins/check_dhcp
-    chgrp nagios /usr/lib/nagios/plugins/check_icmp
-    chgrp nagios /usr/lib/nagios/plugins/check_ide_smart
-
-* set the suid bit so the plugin is executed as root:
-
-    chmod 4750 /usr/lib/nagios/plugins/check_dhcp
-    chmod 4750 /usr/lib/nagios/plugins/check_icmp
-    chmod 4750 /usr/lib/nagios/plugins/check_ide_smart
-
-We prepared a permissions file that would help you during updates. Please do 
the following command 
-as root:
-
-~ # cp 
/usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins 
/etc/permissions.d/nagios-plugins
-
-...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs 
(see comments in the file) and run:
-
-~ # SuSEconfig --module permissions
-
-This will set the correct permissions for those files (from now on also during 
an update).
-
-=== Use sudo to grant the permission and modify your plugin config ===
-
-This way you need entries like:
-
-   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_dhcp 
-   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_icmp
-   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_ide_smart
-
-in ''/etc/sudoers'' and an adapted command definition like the following:
-
-   define command{
-        command_name    check_dhcp
-        command_line    /usr/bin/sudo $USER1$/check_dhcp <other_options_here>
-   }
-
-   define command{
-        command_name    check_icmp
-        command_line    /usr/bin/sudo $USER1$/check_icmp <other_options_here>
-   }
-
-   define command{
-        command_name    check_ide_smart
-        command_line    /usr/bin/sudo $USER1$/check_ide_smart 
<other_options_here>
-   }
 

++++++ nagios-plugins-README.SuSE-check_dhcp ++++++
README.SuSE for nagios-plugins-dhcp

== check_dhcp and SuSEfirewall ==

If you run the check_dhcp script on the server, please make sure your UDP ports
67 and 68 on the _client_ are opened in the firewall. You also need to allow
the receive broadcasts for this interface. Otherwise  the script will be unable
to detect anything.

If your client uses the "external" interface for the check, the entries in
/etc/sysconfig/SuSEfirewall2 should look like:

FW_SERVICES_EXT_UDP="67 68"
FW_ALLOW_FW_BROADCAST_EXT="67 68"

== Special privileges ==

To be "safe per default", SuSE doesn't install this plugin with the
suid bit set. There are two recommended ways about overriding this on
your system:

=== Set the suid bit ===

Copy the prepared permissions file from this directory to the right place 
in your file system:

~ # cp 
/usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
    /etc/permissions.d/nagios-plugins

...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
(see comments in the file) and run:

~ # SuSEconfig --module permissions

This will set the correct permissions (from now on also during an update).

=== Alternative: Use sudo to grant the permission and modify your plugin config 
===

This way you need an entry like:

   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_dhcp

in ''/etc/sudoers'' and an adapted command definition like the following:

   define command{
        command_name    check_dhcp
        command_line    /usr/bin/sudo $USER1$/check_dhcp <other_options_here>
   }



++++++ nagios-plugins-README.SuSE-check_icmp ++++++
README.SuSE for nagios-plugins-icmp

== Special privileges ==

To be "safe per default", SuSE doesn't install this plugin with the
suid bit set. There are two recommended ways about overriding this on
your system:

=== Set the suid bit ===

Copy the prepared permissions file from this directory to the right place 
in your file system:

~ # cp 
/usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
    /etc/permissions.d/nagios-plugins

...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
(see comments in the file) and run:

~ # SuSEconfig --module permissions

This will set the correct permissions (from now on also during an update).

=== Alternative: Use sudo to grant the permission and modify your plugin config 
===

This way you need an entry like:

   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_icmp

in ''/etc/sudoers'' and an adapted command definition like the following:

   define command{
        command_name    check_icmp
        command_line    /usr/bin/sudo $USER1$/check_icmp <other_options_here>
   }



++++++ nagios-plugins-README.SuSE-check_ide_smart ++++++
README.SuSE for nagios-plugins-ide_smart

== Special privileges ==

To be "safe per default", SuSE doesn't install this plugin with the
suid bit set. There are two recommended ways about overriding this on
your system:

=== Set the suid bit ===

Copy the prepared permissions file from this directory to the right place 
in your file system:

~ # cp 
/usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
    /etc/permissions.d/nagios-plugins

...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
(see comments in the file) and run:

~ # SuSEconfig --module permissions

This will set the correct permissions (from now on also during an update).

=== Alternative: Use sudo to grant the permission and modify your plugin config 
===

This way you need an entry like:

   nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_ide_smart

in ''/etc/sudoers'' and an adapted command definition like the following:

   define command{
        command_name    check_ide_smart
        command_line    /usr/bin/sudo $USER1$/check_ide_smart 
<other_options_here>
   }



++++++ nagios-plugins-enhance_check_sensors.patch ++++++
If you look closely at what check_sensors is doing, it has a
not-so-sophisticated series of "if" statements that tries to hit a proper case
as reported by runnings the "sensors(1)" command.  

But it's missing a very important conditional. The script presumes that a
non-error condition will return an RC of 0, and that all error cases will
return an RC > 0.  The important case that is missed is that 0 is returned if
the kernel module isn't loaded.

  "Craig Gardner" <[email protected]>

Index: plugins-scripts/check_sensors.sh
===================================================================
--- plugins-scripts/check_sensors.sh.orig
+++ plugins-scripts/check_sensors.sh
@@ -50,6 +50,9 @@ case "$1" in
                if test ${status} -eq 127; then
                        echo "SENSORS UNKNOWN - command not found (did you 
install lmsensors?)"
                        exit -1
+        elif echo ${sensordata} | egrep "No sensors found" > /dev/null; then
+            echo "SENSORS UNKNOWN - no sensor monitor detected (is the kernel 
module loaded?)"
+            exit -2
                elif test ${status} -ne 0 ; then
                        echo "WARNING - sensors returned state $status"
                        exit 1
++++++ nagios-plugins-wrong_return_in_check_swap.patch ++++++
>From f3e6c9663369d011b241c6fb2c8fd5312f98cacf Mon Sep 17 00:00:00 2001
From: Jan ONDREJ <[email protected]>
Date: Thu, 7 Oct 2010 17:28:48 +0400
Subject: [PATCH 6/6] Prevent check_swap from returning OK, if no swap activated

My swap was not activated on boot for unknown reason and nagios does not
report this as a problem. Here is an example:

[root@kecom ~]# rpm -q nagios-plugins
nagios-plugins-1.4.13-11.fc10.i386
[root@kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2
SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

If there is no swap and users is trying to test percentage of free swap,
consider 0 MB free swap space as problem, or of free/total raises division
by zero, then set percentage to 0%, not to 100%.

Steps to Reproduce:
1. make sure, your swap is empty or it's usage is not large
2. swapoff -a
3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40%

Actual results:
SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

Expected results:
SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

Additional info:
https://bugzilla.redhat.com/512559

Index: nagios-plugins-1.4.15/plugins/check_swap.c
===================================================================
--- nagios-plugins-1.4.15.orig/plugins/check_swap.c
+++ nagios-plugins-1.4.15/plugins/check_swap.c
@@ -124,7 +124,7 @@ main (int argc, char **argv)
                        free_swap_mb += dskfree_mb;
                        if (allswaps) {
                                if (dsktotal_mb == 0)
-                                       percent=100.0;
+                                       percent= 0.0;
                                else
                                        percent = 100 * (((double) dskused_mb) 
/ ((double) dsktotal_mb));
                                result = max_state (result, check_swap 
(percent, dskfree_mb));
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to