Hello community,
here is the log from the commit of package nagios-plugins.1393 for
openSUSE:12.2:Update checked in at 2013-03-11 10:59:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2:Update/nagios-plugins.1393 (Old)
and /work/SRC/openSUSE:12.2:Update/.nagios-plugins.1393.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nagios-plugins.1393", Maintainer is ""
Changes:
--------
New Changes file:
--- /dev/null 2013-02-26 18:15:11.936010755 +0100
+++
/work/SRC/openSUSE:12.2:Update/.nagios-plugins.1393.new/nagios-plugins.changes
2013-03-11 10:59:08.000000000 +0100
@@ -0,0 +1,837 @@
+-------------------------------------------------------------------
+Fri Feb 22 15:08:06 UTC 2013 - [email protected]
+
+- release for 12.1 & 12.2 as update: fixes bnc #778970 & bnc #789428
+
+-------------------------------------------------------------------
+Fri Feb 1 15:04:09 UTC 2013 - [email protected]
+
+- added nagios-plugins-cups from [email protected]
+- recommend additional plugins in nagios-plugins-all
+- decrease dependency in nagios-plugins and nagios-plugins-extras
+ to allow obsoleting the old packages
+
+-------------------------------------------------------------------
+Wed Jan 30 17:40:59 CET 2013 - [email protected]
+
+- allow name resolving for check-ntp plugin in apparmor config
+
+-------------------------------------------------------------------
+Tue Dec 25 18:41:36 UTC 2012 - [email protected]
+
+- added nagios-plugins-check_disk_printf.patch: fix wrong number
+ of printf arguments if verbose
+- refreshed patches
+
+-------------------------------------------------------------------
+Fri Dec 21 01:07:22 CET 2012 - [email protected]
+
+- skip sensors package also for s390 and s390x
+
+-------------------------------------------------------------------
+Mon Nov 5 20:59:17 UTC 2012 - [email protected]
+
+- enhance apparmor profile for check_ntp_time (IPv6 support)
+
+-------------------------------------------------------------------
+Thu Oct 11 12:32:27 UTC 2012 - [email protected]
+
+- nagios-plugins-nagios can also check icinga
+ -> require 'monitoring_daemon'
+
+-------------------------------------------------------------------
+Sat Jul 28 14:30:46 UTC 2012 - [email protected]
+
+- Fix build with missing gets declaration (glibc 2.16)
+
+-------------------------------------------------------------------
+Thu Jul 12 22:08:08 UTC 2012 - [email protected]
+
+- update to 1.4.16:
+ + applied patch that adds both critical and warning thresholds
+ to certificate expiration checks of check_tcp, check_http, check_smtp
+ + check_tcp: Print performance data even with -D
+ + check_snmp: * use single quotes for perf data labels
+ * Fix performance data label containing spaces in
+ check_snmp
+ * Add --perf-oids option for check_snmp to retain
+ optional 1.4.14 compatibility
+ * Accept multiple labels specified with "-l"
+ + check_disk_smb: Add performance data
+ + check_dhcp: * Don't misinterpret the "siaddr" field
+ * Fix handling of "pad" options
+ + check_ping: * Improve parsing of ping6(1) output
+ * fix check_ping where output of ping6 when unreachable
+ * add missing newline to die() calls
+ + check_users: * Whitespace fixes, etc.
+ * improve performance
+ + utils.sh: Added check_range shell function
+ + check_http: * Don't ignore SSL initialization errors
+ * Add support for specifying SSL protocol version
+ * check for and print the certificate cn
+ * use standard threshold functions
+ * improved tests for check_http
+ + check_by_ssh: added -F config file to specify alternative ssh config
+ + check_sensors: * Use symbolic exit codes
+ * Minor whitespace fixes
+ * Detect FAULT status. This can be suppressed
+ with the new "--ignore-fault" option.
+ + check_ldap: * now correctly handles the long option --hostname
+ * Fix check_ldap overriding the port when --ssl was
+ specified after -p
+ + check_smtp: * fix where duplicate messages were displayed for
+ certificate errors
+ * New option to check_smtp to ignore failures when
+ sending QUIT
+ * Abort on missing/unexpected greeting
+ + check_ssh: * Add perfdata to check_ssh
+ + check_procs: * Fix for regex input of '|', being output causing
+ problems with Nagios' parsing of performance data.
+ Now replaced with ','
+- removed upstreamed patches:
+ + nagios-plugins.ctypes.patch
+ + nagios-plugins.check_dhcp-char.patch
+ + nagios-plugins.asprintf.patch
+ + nagios-plugins.check_by_ssh.warncrit.patch
+ + 05_check_linux_raid_fix_striped.dpatch
+ + 10_check_disk_smb_spaces.dpatch
+ + 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch
+ + 13_check_smtp_greeting.dpatch
+ + 14_check_icmp_multiple_ips.dpatch
+ + 15_check_sensors_fault.dpatch
+ + nagios-plugins-enhance_check_sensors.patch
+- suggest instead of recommending the following sub packages in the
+ former nagios-plugins package:
+ + nagios-plugins-nagios
+ + nagios-plugins-xenvm
+ + nagios-plugins-game
+
+-------------------------------------------------------------------
+Sun Jun 10 18:57:35 UTC 2012 - [email protected]
+
+- fix permissions of apparmor profile files
+
+-------------------------------------------------------------------
+Mon Jun 4 12:48:57 UTC 2012 - [email protected]
+
+- add Apparmor profile for check_dhcp
+- add Apparmor profile for check_ntp_time
+- soften the nagios-plugins-nagios dependency to avoid an
+ installed Nagios after an upgrade
+- point users to the README.SuSE files for check_dhcp, check_icmp
+ and check_ide_smart
+
+-------------------------------------------------------------------
+Fri Jun 1 12:10:27 CEST 2012 - [email protected]
+
+- teach check_by_ssh old options -w and -c again
+
+-------------------------------------------------------------------
+Mon May 21 11:53:36 UTC 2012 - [email protected]
+
+- Use BuildRequires: libgnutls-devel instead of gnutls-devel for
+ Factory in keeping with gnutls package naming changes.
+
+-------------------------------------------------------------------
+Wed May 16 07:27:24 UTC 2012 - [email protected]
+
+- rename nagios-plugins-libs to nagios-plugins-common as this
+ package contains more than just the libraries
+
+-------------------------------------------------------------------
+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
+
+-------------------------------------------------------------------
+Wed Feb 22 13:37:54 UTC 2012 - [email protected]
+
+- add GPL-3.0 implicitely to fix bnc #677711
+
++++ 640 more lines (skipped)
++++ between /dev/null
++++ and
/work/SRC/openSUSE:12.2:Update/.nagios-plugins.1393.new/nagios-plugins.changes
New:
----
nagios-plugins-1.4.14-check_inodes.patch
nagios-plugins-1.4.14-check_log.patch
nagios-plugins-1.4.14-command_cfg.patch
nagios-plugins-1.4.14-nmap.patch
nagios-plugins-1.4.14-ntpd.patch
nagios-plugins-1.4.16.tar.bz2
nagios-plugins-1.4.6-no_chown.patch
nagios-plugins-README.SuSE
nagios-plugins-README.SuSE-check_dhcp
nagios-plugins-README.SuSE-check_icmp
nagios-plugins-README.SuSE-check_ide_smart
nagios-plugins-permissions
nagios-plugins-postgresql.patch
nagios-plugins-stdio.h.patch
nagios-plugins-too_few_arguments_for_check_disk.patch
nagios-plugins-wrong_return_in_check_swap.patch
nagios-plugins.changes
nagios-plugins.check_cups.sh
nagios-plugins.check_snmp.arrayaddress.patch
nagios-plugins.check_xenvm.sh
nagios-plugins.negate.validate_arguments.patch
nagios-plugins.spec
usr.lib.nagios.plugins.check_dhcp
usr.lib.nagios.plugins.check_ntp_time
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nagios-plugins.spec ++++++
++++ 1385 lines (skipped)
++++++ nagios-plugins-1.4.14-check_inodes.patch ++++++
http://osdir.com/ml/network.nagios.devel/2005-12/msg00015.html
--- contrib/check_inodes.pl 2008-01-05 16:42:26.000000000 +0100
+++ contrib/check_inodes.pl.oden 2008-01-05 17:45:28.000000000 +0100
@@ -8,12 +8,12 @@
# #
##############################################################################
-$filesystem = $ARGV[0];
-$warnpercent = $ARGV[1];
-$critpercent = $ARGV[2];
+my $filesystem = $ARGV[0];
+my $warnpercent = $ARGV[1];
+my $critpercent = $ARGV[2];
#------Find out what kind of syntax to expect
-$systype=`uname`;
+my $systype=`uname`;
chomp($systype);
#------Make sure we got called with the right number of arguments
@@ -26,7 +26,7 @@
}#end if
#------This gets the data from the df command
-$inputline = `df -i $filesystem|grep -v "Filesystem"`;
+my $inputline = `df -i $filesystem|grep -v "Filesystem"`;
#------replaces all spaces with a single :, that way we can use split
$inputline =~ y/ /:/s;
@@ -35,13 +35,14 @@
#------(at least mine do). This way I can use this plugin on all my hosts
#------if neither of these work, add your own in, or if you've got one that
#------just flat out reports something different...well...perl is your friend.
+my $ipercent;
SWITCH: {
if ($systype eq "Linux") {
- ($fs,$inodes,$iused,$ifree,$ipercent,$mntpt) = split(/:/,$inputline);
+ $ipercent = (split(/:/,$inputline))[4];
last SWITCH;
}#end if
if ($systype eq "AIX") {
- ($fs,$blks,$free,$percentused,$iused,$ipercent,$mntpt) =
split(/:/,$inputline);
+ $ipercent = (split(/:/,$inputline))[5];
last SWITCH;
}#end if
}#end switch
++++++ nagios-plugins-1.4.14-check_log.patch ++++++
Index: plugins-scripts/check_log.sh
===================================================================
--- plugins-scripts/check_log.sh.orig
+++ plugins-scripts/check_log.sh
@@ -61,15 +61,16 @@
#PATH=""
ECHO="/bin/echo"
-GREP="/bin/egrep"
-DIFF="/bin/diff"
-TAIL="/bin/tail"
+GREP="/usr/bin/egrep"
+DIFF="/usr/bin/diff"
+TAIL="/usr/bin/tail"
CAT="/bin/cat"
RM="/bin/rm"
CHMOD="/bin/chmod"
-TOUCH="/bin/touch"
+TOUCH="/usr/bin/touch"
+MKTEMP="/bin/mktemp"
-PROGNAME=`/bin/basename $0`
+PROGNAME=`/usr/bin/basename $0`
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
REVISION="@NP_VERSION@"
@@ -166,10 +167,10 @@
# If the source log file doesn't exist, exit
-if [ ! -e $logfile ]; then
+if [ ! -e "$logfile" ]; then
$ECHO "Log check error: Log file $logfile does not exist!\n"
exit $STATE_UNKNOWN
-elif [ ! -r $logfile ] ; then
+elif [ ! -r "$logfile" ] ; then
$ECHO "Log check error: Log file $logfile is not readable!\n"
exit $STATE_UNKNOWN
fi
@@ -178,8 +179,8 @@
# we're running this test, so copy the original log file over to
# the old diff file and exit
-if [ ! -e $oldlog ]; then
- $CAT $logfile > $oldlog
+if [ ! -e "$oldlog" ]; then
+ $CAT "$logfile" > "$oldlog"
$ECHO "Log check data initialized...\n"
exit $STATE_OK
fi
@@ -188,25 +189,25 @@
# The temporary file that the script should use while
# processing the log file.
-if [ -x /bin/mktemp ]; then
- tempdiff=`/bin/mktemp /tmp/check_log.XXXXXXXXXX`
+if [ -x "$MKTEMP" ]; then
+ tempdiff=`$MKTEMP /tmp/check_log.XXXXXXXXXX`
else
tempdiff=`/bin/date '+%H%M%S'`
tempdiff="/tmp/check_log.${tempdiff}"
- $TOUCH $tempdiff
- $CHMOD 600 $tempdiff
+ $TOUCH "$tempdiff"
+ $CHMOD 600 "$tempdiff"
fi
-$DIFF $logfile $oldlog | $GREP -v "^>" > $tempdiff
+$DIFF "$logfile" "$oldlog" | $GREP -v "^>" > "$tempdiff"
# Count the number of matching log entries we have
-count=`$GREP -c "$query" $tempdiff`
+count=`$GREP -c "$query" "$tempdiff"`
# Get the last matching entry in the diff file
-lastentry=`$GREP "$query" $tempdiff | $TAIL -1`
+lastentry=`$GREP "$query" "$tempdiff" | $TAIL -1`
-$RM -f $tempdiff
-$CAT $logfile > $oldlog
+$RM -f "$tempdiff"
+$CAT "$logfile" > "$oldlog"
if [ "$count" = "0" ]; then # no matches, exit with no error
$ECHO "Log check ok - 0 pattern matches found\n"
++++++ nagios-plugins-1.4.14-command_cfg.patch ++++++
Index: command.cfg.in
===================================================================
--- command.cfg.in.orig
+++ command.cfg.in
@@ -28,7 +28,7 @@
# Service notification command - send email with problem summary
-command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$
alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$
+command[notify-by-email]=@bindir@/printf "$OUTPUT$" | /bin/mail -s
'$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$
# Service notification command - send email to alphanumeric pager
# gateway The notify-by-epager command assumes that each contact has a
@@ -48,13 +48,13 @@
## Send notifications to a pager using modem with Qpage (www.qpage.com)
-command[notify-by-qpage]=/usr/bin/printf "Service: %s\nHost: %s\nAddress:
%s\nState: %s\nInfo: %s\nDate: %s" '$SERVICEDESC$' '$HOSTNAME$' '$HOSTADDRESS$'
'$SERVICESTATE$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p
$CONTACTPAGER$
+command[notify-by-qpage]=@bindir@/printf "Service: %s\nHost: %s\nAddress:
%s\nState: %s\nInfo: %s\nDate: %s" '$SERVICEDESC$' '$HOSTNAME$' '$HOSTADDRESS$'
'$SERVICESTATE$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p
$CONTACTPAGER$
-command[host-notify-by-qpage]=/usr/bin/printf "Host: %s is %s\nInfo: %s\nDate:
%s" '$HOSTALIAS$' '$HOSTSTATES$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage
-l 0 -p $CONTACTPAGER$
+command[host-notify-by-qpage]=@bindir@/printf "Host: %s is %s\nInfo: %s\nDate:
%s" '$HOSTALIAS$' '$HOSTSTATES$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage
-l 0 -p $CONTACTPAGER$
## Send notifications using SMSclient (www.smsclient.org)
-command[notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$
"$NOTIFICATIONTYPE$: $HOSTADDRESS$ $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$"
-command[host-notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "Host
$HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$"
+command[notify-by-smsclient]=@bindir@/sms_client -q $CONTACTPAGER$
"$NOTIFICATIONTYPE$: $HOSTADDRESS$ $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$"
+command[host-notify-by-smsclient]=@bindir@/sms_client -q $CONTACTPAGER$ "Host
$HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$"
@@ -163,7 +163,7 @@
#
# the following 4 return the following codes: other=1, ok=2, degraded=3,
failed=4
#
-#command[check_compaq_thermalCondition]=@libexec@/check_snmp -H $HOSTADDRESS$
-C public -o
.1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0
-u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w
2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status "
+#command[check_compaq_thermalCondition]=@libexecdir@/check_snmp -H
$HOSTADDRESS$ -C public -o
.1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0
-u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w
2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status "
#
#
++++++ nagios-plugins-1.4.14-nmap.patch ++++++
Index: contrib/check_nmap.py
===================================================================
--- contrib/check_nmap.py.orig
+++ contrib/check_nmap.py
@@ -54,7 +54,7 @@
import utils
# Where temp files should be placed
-tempfile.tempdir='/usr/local/nagios/var'
+tempfile.tempdir='/tmp'
# Base name for tempfile
tempfile.template='check_nmap_tmp.'
++++++ nagios-plugins-1.4.14-ntpd.patch ++++++
Index: plugins-scripts/check_ntp.pl
===================================================================
--- plugins-scripts/check_ntp.pl.orig
+++ plugins-scripts/check_ntp.pl
@@ -313,7 +313,6 @@
}
} else {
print "No match!\n" if $verbose;
- $jitter = '(not parsed)';
}
}
++++++ nagios-plugins-1.4.6-no_chown.patch ++++++
Index: plugins-root/Makefile.am
===================================================================
--- plugins-root/Makefile.am.orig
+++ plugins-root/Makefile.am
@@ -47,7 +47,6 @@ INSTALL_SUID = \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \
- chown root $(DESTDIR)$(libexecdir)/$$p; \
echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \
chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
done
@@ -66,11 +65,12 @@ install-exec-local: $(noinst_PROGRAMS)
&& chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
&& can_create_suid_root_executable=yes; \
rm -f $$TMPFILE; \
- if test $$can_create_suid_root_executable = yes; then \
- $(INSTALL_SUID); \
+ $(INSTALL_SUID); \
+ if test $$can_create_suid_root_executable != yes; then \
else \
- echo "WARNING: insufficient access; not installing setuid plugins"; \
+ echo "WARNING: insufficient access; not installing plugins as
setuid"; \
echo "NOTE: to install setuid plugins, run 'make install-root' as
root"; \
+ echo "NOTE: or fix this in your packaging (like the specfile)"; \
fi
# /* Author Coreutils team sub-citation */
Index: plugins-root/Makefile.in
===================================================================
--- plugins-root/Makefile.in.orig
+++ plugins-root/Makefile.in
@@ -1015,7 +1015,6 @@ INSTALL_SUID = \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \
- chown root $(DESTDIR)$(libexecdir)/$$p; \
echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \
chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
done
@@ -1450,11 +1449,11 @@ install-exec-local: $(noinst_PROGRAMS)
&& chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
&& can_create_suid_root_executable=yes; \
rm -f $$TMPFILE; \
- if test $$can_create_suid_root_executable = yes; then \
- $(INSTALL_SUID); \
- else \
- echo "WARNING: insufficient access; not installing setuid plugins"; \
+ $(INSTALL_SUID); \
+ if test $$can_create_suid_root_executable != yes; then \
+ echo "WARNING: insufficient access; not installing plugins as
setuid"; \
echo "NOTE: to install setuid plugins, run 'make install-root' as
root"; \
+ echo "NOTE: or fix this in your packaging (specfile or alike)"; \
fi
clean-local:
++++++ nagios-plugins-README.SuSE ++++++
README.SuSE for nagios-plugins
== Features and documentation ==
Please refer to the upstream documentation on
* http://www.nagios.org/docs/
* http://nagiosplugins.org/
* http://www.nagioscommunity.org/wiki/index.php/Main_Page
The openSUSE package contains most of the currently available plugins.
All plugins are installed in ''/usr/lib/nagios/plugins/'' on every
architecture.
++++++ 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-permissions ++++++
# Please uncomment the needed plugins and place the file in the
# /etc/permissions.d/ directory:
# cp nagios-plugins /etc/permissions.d/
#
# Afterwards the files below will be adapted after a nagios-plugins
# update via
# 'SuSEconfig --module permissions'
# automatically.
#
# Note: You may check/set the following variable in /etc/sysconfg/security
# to allow SuSEconfig to correct the file permissions:
# CHECK_PERMISSIONS="set"
#
# /usr/lib/nagios/plugins/check_dhcp root.root 4755
# /usr/lib/nagios/plugins/check_icmp root.root 4755
# /usr/lib/nagios/plugins/check_ide_smart root.root 4755
++++++ nagios-plugins-postgresql.patch ++++++
Index: plugins/check_pgsql.c
===================================================================
--- plugins/check_pgsql.c.orig 2009-06-06 09:04:49.000000000 +0200
+++ plugins/check_pgsql.c 2009-11-24 23:08:37.390542000 +0100
@@ -36,6 +36,7 @@ const char *email = "nagiosplug-devel@li
#include "utils.h"
#include "netutils.h"
+#include <pg_config_manual.h>
#include <libpq-fe.h>
#include <pg_config_manual.h>
++++++ nagios-plugins-stdio.h.patch ++++++
Index: nagios-plugins-1.4.16/gl/stdio.in.h
===================================================================
--- nagios-plugins-1.4.16.orig/gl/stdio.in.h
+++ nagios-plugins-1.4.16/gl/stdio.in.h
@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if HAVE_RAW_DECL_GETS
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
++++++ nagios-plugins-too_few_arguments_for_check_disk.patch ++++++
Index: plugins/check_disk.c
===================================================================
--- plugins/check_disk.c.orig
+++ plugins/check_disk.c
@@ -958,7 +958,7 @@ get_stats (struct parameter_list *p, str
if (verbose >= 3)
printf("Group %s: adding %llu blocks sized %llu, (%s) used_units=%g
free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
p_list->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize,
p_list->best_match->me_mountdir, p_list->dused_units, p_list->dfree_units,
- p_list->dtotal_units, mult);
+ p_list->dtotal_units, tmpfsp.fsu_blocksize, mult);
/* prevent counting the first FS of a group twice since its
parameter_list entry
* is used to carry the information of all file systems of the entire
group */
++++++ 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));
++++++ nagios-plugins.check_cups.sh ++++++
#!/bin/bash
# check_cups - nagios plugin
#
# Copyright (C) 2008-2010, Novell, Inc.
# Copyright (C) 2011-2013, SUSE Linux Products GmbH
# Author: Martin Caj <[email protected]>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of the Novell nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
#
# Autor notes: I`d like to thank to John E. Vincent ([email protected])
# I learn a lof from his check CUPS print queue plugin.
# Then I`d like to thank to Mark Shirley for his
check_cups_printer.sh
# script, which was also inspiration for me.
# Both of them you can find on http://exchange.nagios.org/ web
site.
# Martin Caj 31/01/2013 <[email protected]>
# check_cups - nagios plugin for checking cups service
# Description:
#
# This plugin will check the status of a remote CUPS
# print service for the printer status, then if status is ok
# it will check the queue. It can check all avaible printes
# on the cups, or just one of them.
# Then the plugin will check the queue:
# it will provide the size of the queue
# and optionally the age of the queue
#
# Version : 0.1
#searchning the lpstat:
LPSTAT="$(which lpstat)"
# debug the script:
#set -x
# Nagios return codes
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
# check it lpstat is missing.
if [ ! -x "$LPSTAT" ]
then
echo "UNKNOWN: "$LPSTAT" not found or is not executable by the nagios
user"
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
fi
PROGNAME=$(basename $0)
print_usage() {
# Name: print_usage
# Desc: It just print the usage out.
echo "Usage: "$PROGNAME" -H <hostname> -P -p<The CUPS printer name> |
-Q <s|b> -w <size warning level> -c <size critical level> -a <max age>"
echo
echo "Notes:"
echo "-H: Hostname - Can be a hostname or IP address"
echo "-P: Check only the printers status it doesn't check queue"
echo "-p: It will check only one specific printer"
echo "-Q: Type of check - Can be queue size (s) or both queu size and
queue age (b)"
echo "-w: WARNING level for queue size"
echo "-c: CRITICAL level for queue size"
echo "-a: Max age of queue. Returns CRITICAL if jobs exists older than
<max age> days"
echo
}
print_help() {
# Name: print_help
# Desc: It just print the usage and the help out. Then it end with exit code 0
print_usage
echo
echo "This plugin will check the CUPS print service for the printer
status, then if status is ok"
echo "it will check the queue on a remote (or local with -H localhost)
CUPS server."
echo "It can check both the size of the queue and the age of the oldest
print job in the queue."
echo "-w and -c are for reporting warning and critical levels of the
queue size."
echo "-a is optional for specifying the max age of a job in the print
queue. Anything older thatn <max age>"
echo "will return a CRITICAL"
echo
exit 0
}
check_queue_size() {
# Name: check_queue_size
# Desc: It check the status of the CUPS queue size.
# $exitstatus= might be ok|warn"crittical deppends on -w and -c
if [ "$JOBCOUNT" -ge "$critlevel" ]
then
MESSAGE="CRITICAL: CUPS queue size - "$JOBCOUNT"| "$PERFDATA""
exitstatus="$STATE_CRITICAL"
elif [ "$JOBCOUNT" -ge "$warnlevel" ]
then
MESSAGE="WARNING: CUPS queue size - "$JOBCOUNT"| "$PERFDATA""
exitstatus="$STATE_WARNING"
else
MESSAGE="OK: CUPS queue size - "$JOBCOUNT"| "$PERFDATA""
exitstatus="$STATE_OK"
fi
}
check_printer_status() {
# Name:check_printer_status
# Desc: It check status of all printers or one specific printer
# output is store in $OUTPUT and $exitstatus
if [ -z $printername ]
then
echo "Checking all printers..."
RESULT=$("$LPSTAT" -h "$hostname" -p )
if [ $? != 0 ]
then
echo "ERROR: Probably wrong host name: "$hostname", or CUPS is
not running there."
exit "$STATE_UNKNOWN"
fi
else
echo "Checking only the printer "$printername"."
RESULT=$("$LPSTAT" -h "$hostname" -p "$printername")
if [ $? != 0 ]
then
echo "ERROR: the printer "$printername" doesn't exist on the
cups server "$hostname"."
echo "please check command: '"$LPSTAT" -h "$hostname" -p'
without printer name."
exit "$STATE_UNKNOWN"
fi
fi
case "$RESULT" in
*Rejecting*)
OUTPUT="CRITICAL - CUPS printer "$printername" is rejecting
jobs."
exitstatus="$STATE_CRITICAL"
;;
*Unable*)
OUTPUT="CRITICAL - CUPS Unable to connect to "$printername"."
exitstatus="$STATE_CRITICAL"
;;
*disabled*)
OUTPUT="CRITICAL - CUPS printer "$printername" is stopped."
exitstatus="$STATE_CRITICAL"
;;
*Paused*)
OUTPUT="WARNING: - CUPS printer "$printername" is stopped."
exitstatus="$STATE_WARNING"
;;
*printing*)
OUTPUT="OK - CUPS printer "$printername" is printing."
exitstatus="$STATE_OK"
;;
*idle*)
OUTPUT="OK - CUPS printer "$printername" is idle."
exitstatus="$STATE_OK"
;;
*)
OUTPUT="CRITICAL - Unknown error occured while checking
"$printername"."
exitstatus="$STATE_CRITICAL"
;;
esac
}
# It testing how many variable user add on command line
# The minimu for test printes only is 3
if [ $# -lt 3 ]; then
print_usage
exit "$STATE_UNKNOWN"
fi
# this set default exit status to:
exitstatus="$STATE_UNKNOWN"
# testing arguments:
while test -n "$1"; do
case "$1" in
--help)
print_help
exit "$STATE_OK"
;;
-h)
print_help
exit "$STATE_OK"
;;
-P)
testprinter="1"
;;
-p)
printername="$2"
shift
;;
-H)
hostname=$2
shift
;;
-Q)
testtype=$2
shift
;;
-w)
warnlevel=$2
shift
;;
-c)
critlevel=$2
shift
;;
-a)
maxage=$2
shift
;;
esac
shift
done
# Check arguments for validity:
if [ -z $hostname ]
then
echo "You must specify a hostname (or localhost to test the local
system)"
print_usage
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
fi
# testing priner(s)
if [ -z $testprinter ] #Check printes and continue with the script
then
check_printer_status $printname
# if there is differnt exit status then 0 doesn`t maka any sance to
# continue with the check. exit it ASAP.
if [ $exitstatus != 0 ]
then
echo "$OUTPUT"
exit "$exitstatus"
fi
else #Check printers only and end the sctipt.
check_printer_status
echo "$OUTPUT"
exit "$exitstatus"
fi
# testing arguments for the queue checks:
if [[ -z $critlevel || -z $warnlevel ]] # Did we get warn and crit values?
then
echo "You must specify a warning and critical level"
print_usage
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
elif [ $critlevel -lt $warnlevel ] # Do the warn/crit values make sense?
then
echo "CRITICAL value of "$critlevel" is less than WARNING level of
"$warnlevel""
print_usage
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
fi
# what kind of queue test will be run:
if [ -z $testtype ]
then
echo "You must specify a test type"
print_usage
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
# this is a very nice elif, it match if -a X is missing
elif [[ "$testtype" = [b]* && -z $maxage ]]
then
echo "You must specify <max age> when using a test type of 'b'"
print_usage
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
else
JOBTMP=$(mktemp -t lpstat.XXXXXX) # Create a tmpfile to store the
lpstat results
STALEJOBCOUNT=0 # default number of old jobs
CURDATETS=$(date +%s) # Get the current date as unixtime
"$LPSTAT" -h "$hostname" -o > "$JOBTMP" # run the lpstat command
against the host.
if [ $? -ne 0 ]
then
rm -rf "$JOBTMP"
echo "UNKNOWN: lpstat command returned an error. Please test
this script manually."
exitstatus="$STATE_UNKNOWN"
exit "$exitstatus"
fi
JOBCOUNT=$(wc -l < $JOBTMP) # populate the jobcount
PERFDATA="print_jobs="$JOBCOUNT";"$warnlevel";"$critlevel";0"
if [[ "$JOBCOUNT" -gt 0 && $maxage ]]
then
MAXAGETS=$(echo "86400 * $maxage" | bc) # 86400 seconds in a
day * maxage
exec<"$JOBTMP" # read the file to determine job age
while read PRINTJOB
do
# Grab the job date from the job listing
JOBDATE=$(echo $PRINTJOB | awk '{ print $4, $5, $6, $7,
$8 }')
# Convert the job date to unixtime
JOBDATETS=$(date --date="$JOBDATE" +%s)
DATEDIFF=$(echo "($CURDATETS - $JOBDATETS)" | bc)
if [ $DATEDIFF -gt $MAXAGETS ]
then
MESSAGE="CRITICAL: Some CUPS jobs are older
than "$maxage" days| "$PERFDATA""
exitstatus="$STATE_CRITICAL"
else
check_queue_size
fi
done
else
check_queue_size
fi
rm -rf "$JOBTMP"
fi
# end: print the results and end with exit code for Nagios
echo "$OUTPUT"
echo "$MESSAGE"
exit "$exitstatus"
++++++ nagios-plugins.check_snmp.arrayaddress.patch ++++++
Index: plugins/check_snmp.c
===================================================================
--- plugins/check_snmp.c.orig
+++ plugins/check_snmp.c
@@ -507,7 +507,7 @@ main (int argc, char **argv)
len = sizeof(perfstr)-strlen(perfstr)-1;
strncat(perfstr, show, len>ptr-show ? ptr-show : len);
- if (type)
+ if (type[0])
strncat(perfstr, type,
sizeof(perfstr)-strlen(perfstr)-1);
strncat(perfstr, " ",
sizeof(perfstr)-strlen(perfstr)-1);
}
++++++ nagios-plugins.check_xenvm.sh ++++++
#!/bin/sh
#
# COPYRIGHT : (c) 2006 SUSE Linux GmbH. All rights reserved.
#
# AUTHOR : Axel Schmidt
#
# BELONGS TO : NLPOS/SLEPOS/Xen Nagios Integration
#
# DESCRIPTION : Runs "xm list" and returns the available xen vms
#
# $Revision: 1.0 $
#
# Permission to use, copy, modify, distribute, and sell this software
# and its documentation for any purpose is hereby granted without fee,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation.
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHOR OR SUSE BE LIABLE FOR ANY CLAIM, DAMAGES
# OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# http://www.novell.com/coolsolutions/feature/19490.html
PARM1=$1
WARN=$2
PARM2=$3
CRIT=$4
if [ "$PARM2" != "-c" -o "$CRIT" == "" ]; then
echo "Usage: $0 -w <warning> -c <critical>"
# Nagios exit code 3 = status UNKNOWN = orange
if [ "$PARM1" != "-h" ]; then
exit 3
else
echo ""
echo " -w = Minimum Number of Xen VMs to activate a warning
message."
echo " -c = Number of Xen VMs to activate a critical message."
echo " -h = This help message."
echo "also read
http://www.novell.com/coolsolutions/feature/19490.html"
exit 3
fi
fi
RUNNING=$(sudo /usr/sbin/xm list | awk '!/[DN]/ {print $1 }')
NBVMS=$(echo $RUNNING | wc -w)
HNAME=$(hostname)
#echo "Xen Running =" $RUNNING
if [ "$NBVMS" -le "$CRIT" ]; then
echo "Critical Xen VMs Usage - Total NB: $NBVMS - detected VMs:
$RUNNING"
# Nagios exit code 2 = status CRITICAL = red
exit 2
else
if [ "$NBVMS" -le "$WARN" ]; then
echo "Warning Xen VMs Usage - Total NB: $NBVMS - detected VMs:
$RUNNING"
# Nagios exit code 1 = status WARNING = yellow
exit 1
else
echo "OK: Xen Hypervisor \"$HNAME\" is running Xen VMs:
$RUNNING"
# Nagios exit code 0 = status OK = green
exit 0
fi
fi
++++++ nagios-plugins.negate.validate_arguments.patch ++++++
---
plugins/negate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: plugins/negate.c
===================================================================
--- plugins/negate.c.orig 2009-05-07 23:08:25.000000000 +0200
+++ plugins/negate.c 2009-11-24 23:08:37.611524000 +0100
@@ -42,7 +42,7 @@ const char *email = "nagiosplug-devel@li
/* char *command_line; */
static const char **process_arguments (int, char **);
-int validate_arguments (char **);
+void validate_arguments (char **);
void print_help (void);
void print_usage (void);
int subst_text = FALSE;
@@ -204,7 +204,7 @@ process_arguments (int argc, char **argv
}
-int
+void
validate_arguments (char **command_line)
{
if (command_line[0] == NULL)
++++++ usr.lib.nagios.plugins.check_dhcp ++++++
#include <tunables/global>
/usr/lib/nagios/plugins/check_dhcp {
#include <abstractions/base>
#include <abstractions/nameservice>
capability net_raw,
}
++++++ usr.lib.nagios.plugins.check_ntp_time ++++++
#include <tunables/global>
/usr/lib/nagios/plugins/check_ntp_time {
#include <abstractions/base>
#include <abstractions/consoles>
#include <abstractions/xad>
network inet dgram,
network inet6 dgram,
capability ipc_lock,
capability net_bind_service,
capability sys_time,
capability sys_resource,
/etc/gai.conf r,
/usr/lib/nagios/plugins/check_ntp_time rm,
/etc/hosts r,
/etc/resolv.conf r,
/var/run/nscd/* r,
}
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]