From 1555f5b1000dc9d5ac4fb52d65daea121f51f5f0f624215a94c8db508d0e1305 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Tue, 15 Jul 2014 14:54:25 +0000 Subject: [PATCH] remove link to broken package OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=4 --- .gitattributes | 23 + .gitignore | 1 + check_ircd_ssl | 215 +++ monitoring-plugins-1.4.14-check_log.patch | 85 + monitoring-plugins-1.4.14-ntpd.patch | 12 + monitoring-plugins-1.4.6-no_chown.patch | 56 + monitoring-plugins-2.0.tar.bz2 | 3 + monitoring-plugins-README.SUSE | 25 + monitoring-plugins-README.SUSE-check_cups | 120 ++ monitoring-plugins-README.SUSE-check_dhcp | 54 + monitoring-plugins-README.SUSE-check_icmp | 42 + ...toring-plugins-README.SUSE-check_ide_smart | 42 + monitoring-plugins-permissions | 18 + monitoring-plugins-postgresql.patch | 12 + monitoring-plugins-rpmlintrc | 5 + ...ins-too_few_arguments_for_check_disk.patch | 13 + ...g-plugins-wrong_return_in_check_swap.patch | 44 + monitoring-plugins.changes | 1003 +++++++++++ monitoring-plugins.check_cups.sh | 371 ++++ ....check_ntp.c-64bit-portability-issue.patch | 13 + ...ring-plugins.check_snmp.arrayaddress.patch | 13 + ...ng-plugins.check_snmp.snmpv3-context.patch | 125 ++ ...ng-plugins.negate.validate_arguments.patch | 26 + monitoring-plugins.spec | 1570 +++++++++++++++++ monitoring-plugins.spec-20140715 | 1393 +++++++++++++++ usr.lib.nagios.plugins.check_cups | 31 + usr.lib.nagios.plugins.check_dhcp | 6 + usr.lib.nagios.plugins.check_icmp | 9 + usr.lib.nagios.plugins.check_ide_smart | 10 + usr.lib.nagios.plugins.check_ntp_time | 22 + usr.lib.nagios.plugins.check_ping | 12 + usr.lib.nagios.plugins.check_ssh | 5 + 32 files changed, 5379 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 check_ircd_ssl create mode 100644 monitoring-plugins-1.4.14-check_log.patch create mode 100644 monitoring-plugins-1.4.14-ntpd.patch create mode 100644 monitoring-plugins-1.4.6-no_chown.patch create mode 100644 monitoring-plugins-2.0.tar.bz2 create mode 100644 monitoring-plugins-README.SUSE create mode 100644 monitoring-plugins-README.SUSE-check_cups create mode 100644 monitoring-plugins-README.SUSE-check_dhcp create mode 100644 monitoring-plugins-README.SUSE-check_icmp create mode 100644 monitoring-plugins-README.SUSE-check_ide_smart create mode 100644 monitoring-plugins-permissions create mode 100644 monitoring-plugins-postgresql.patch create mode 100644 monitoring-plugins-rpmlintrc create mode 100644 monitoring-plugins-too_few_arguments_for_check_disk.patch create mode 100644 monitoring-plugins-wrong_return_in_check_swap.patch create mode 100644 monitoring-plugins.changes create mode 100644 monitoring-plugins.check_cups.sh create mode 100644 monitoring-plugins.check_ntp.c-64bit-portability-issue.patch create mode 100644 monitoring-plugins.check_snmp.arrayaddress.patch create mode 100644 monitoring-plugins.check_snmp.snmpv3-context.patch create mode 100644 monitoring-plugins.negate.validate_arguments.patch create mode 100644 monitoring-plugins.spec create mode 100644 monitoring-plugins.spec-20140715 create mode 100644 usr.lib.nagios.plugins.check_cups create mode 100644 usr.lib.nagios.plugins.check_dhcp create mode 100644 usr.lib.nagios.plugins.check_icmp create mode 100644 usr.lib.nagios.plugins.check_ide_smart create mode 100644 usr.lib.nagios.plugins.check_ntp_time create mode 100644 usr.lib.nagios.plugins.check_ping create mode 100644 usr.lib.nagios.plugins.check_ssh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/check_ircd_ssl b/check_ircd_ssl new file mode 100644 index 0000000..34467d3 --- /dev/null +++ b/check_ircd_ssl @@ -0,0 +1,215 @@ +#! /usr/bin/perl -w +# +# Copyright (C) 2014, SUSE Linux Products GmbH, Nuremberg +# Author: Lars Vogdt +# +# 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. +# +use Getopt::Long; +use IO::Socket::INET6; +use strict; +use vars qw($PROGNAME $VERSION); +use vars qw($opt_V $opt_h $opt_t $opt_p $opt_H $opt_w $opt_c $ssl $verbose); +use lib '/usr/lib/nagios/plugins'; +use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); + +# ----------------------------------------------------[ Function Prototypes ]-- +sub print_help (); +sub print_usage (); + +# -------------------------------------------------------------[ Enviroment ]-- +$ENV{PATH} = ''; +$ENV{ENV} = ''; +$ENV{BASH_ENV} = ''; + +# -----------------------------------------------------------------[ Global ]-- +$PROGNAME = 'check_ircd'; +$VERSION = '1.5.0'; +my $nick = "ircd$$"; + +# -------------------------------------------------------------[ print_help ]-- +sub print_help () +{ + print_revision($PROGNAME,$VERSION); + print "Copyright (c) 2014 SUSE Linux Products GmbH, Nuremberg +based on the original work of Richard Mayhew/Karl DeBisschop in 2000 + +Perl Check IRCD plugin for Nagios + +"; + print_usage(); + print " +-H, --hostname=HOST + Name or IP address of host to check +-w, --warning=INTEGER + Number of connected users which generates a warning state (Default: 50) +-c, --critical=INTEGER + Number of connected users which generates a critical state (Default: 100) +-p, --port=INTEGER + Port that the ircd daemon is running on (Default: 6667) +-v, --verbose + Print extra debugging information +-s, --ssl + Use SSL for connection (NOTE: might need '-p 6697' option) +"; +} + +# ------------------------------------------------------------[ print_usage ]-- +sub print_usage () { + print "Usage: $PROGNAME -H [-w ] [-c ] [-p ] [-s]\n"; +} + +# ------------------------------------------------------------------[ debug ]-- +sub debug ($$) +{ + my ($string,$verbose) = @_; + if ($verbose){ + print STDOUT "DEBUG: $string"; + } +} + +# ----------------------------------------------------------------[ connect ]-- +sub connection ($$$$$$) { + my ($server,$port,$ssl,$ping_timeout,$nick,$verbose) = @_; + my $user=-1; + debug("Attempting connect.\n",$verbose); + # Connect to server + debug("Connecting ...........\n",$verbose); + my $sock = IO::Socket::INET6->new( PeerAddr => $server, + PeerPort => $port, + Proto => 'tcp', + Domain => AF_UNSPEC ) or return ($user); + if($ssl) { + use IO::Socket::SSL; + debug("Starting SSL .........\n",$verbose); + IO::Socket::SSL->start_SSL( $sock, + SSL_verify_mode => 0, # Do not verify certificate + ) or die "SSL handshake failed: $SSL_ERROR"; + } + debug("Connected to server: $server on port: $port\n",$verbose); + # Set nick and username + debug("Sending user info ....\n",$verbose); + print $sock "NICK $nick\nUSER monitor localhost localhost : \n"; + # Catch SIGALRM from the OS when timeout expired. + local $SIG{ALRM} = sub {$sock->shutdown(0);}; + # Send all incomming data to the parser + while (<$sock>) { + alarm 0; + chomp($_); + if (/^PING \:(.+)/) { + debug("Received PING request, sending PONG :$1\n",$verbose); + print $sock "PONG :$1\n"; + } + elsif (/\:I have\s+(\d+)/){ + $user=$1; + last; + } + alarm $ping_timeout; + } + debug("Closing socket.\n",$verbose); + close $sock; + return $user; +} + +# ------------------------------------------------------------[ check_users ]-- +sub check_users ($$$){ + my ($users,$crit,$warn)=@_; + $users =~ s/\ //g; + my ($state,$answer); + if ($users >= 0) { + if ($users > $crit) { + $state = "CRITICAL"; + $answer = "Critical Number Of Clients Connected : $users (Limit = $crit)"; + + } elsif ($users > $warn) { + $state = "WARNING"; + $answer = "Warning Number Of Clients Connected : $users (Limit = $warn)"; + + } else { + $state = "OK"; + $answer = "IRCD ok - Current Local Users: $users"; + } + $answer.="|users=$users;$warn;$crit;0\n"; + } else { + $state = "UNKNOWN"; + $answer = "Server has less than 0 users! Something is Really WRONG!\n"; + } + return ($answer,$state) +} + +# ===================================================================[ MAIN ]== +MAIN: +{ + my $answer = 'IRCD UNKNOWN: Unknown error - maybe could not authenticate\n'; + my $state = 'UNKOWN'; + my $hostname; + Getopt::Long::Configure('bundling'); + GetOptions + ( "V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "v" => \$verbose,"verbose" => \$verbose, + "s" => \$ssl, "ssl" => \$ssl, + "t=i" => \$opt_t, "timeout=i" => \$opt_t, + "w=i" => \$opt_w, "warning=i" => \$opt_w, + "c=i" => \$opt_c, "critical=i" => \$opt_c, + "p=i" => \$opt_p, "port=i" => \$opt_p, + "H=s" => \$opt_H, "hostname=s" => \$opt_H); + if ($opt_V) { + print_revision($PROGNAME,$VERSION); + exit $ERRORS{'OK'}; + } + if ($opt_h) {print_help(); exit $ERRORS{'OK'};} + ($opt_H) || ($opt_H = shift @ARGV) || usage("Host name/address not specified\n"); + my $server = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); + ($server) || usage("Invalid host: $opt_H\n"); + ($opt_w) || ($opt_w = shift @ARGV) || ($opt_w = 50); + my $warn = $1 if ($opt_w =~ /^([0-9]+)$/); + ($warn) || usage("Invalid warning threshold: $opt_w\n"); + ($opt_c) || ($opt_c = shift @ARGV) || ($opt_c = 100); + my $crit = $1 if ($opt_c =~ /^([0-9]+)$/); + ($crit) || usage("Invalid critical threshold: $opt_c\n"); + if ($crit < $warn){ + usage("Invalid threshold: $crit for critical is lower than $warn for warning\n"); + } + ($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = 6667); + my $port = $1 if ($opt_p =~ /^([0-9]+)$/); + ($port) || usage("Invalid port: $opt_p\n"); + if ($opt_t && $opt_t =~ /^([0-9]+)$/) { $TIMEOUT = $1; } + # Just in case of problems, let's not hang Nagios + $SIG{'ALRM'} = sub { + print "Somthing is Taking a Long Time, Increase Your TIMEOUT (Currently Set At $TIMEOUT Seconds)\n"; + exit $ERRORS{"UNKNOWN"}; + }; + alarm($TIMEOUT); + my $ping_timeout=$TIMEOUT-1; + my $users=connection($server,$port,$ssl,$ping_timeout,$nick,$verbose); + ($answer,$state)=check_users($users,$crit,$warn); + print "$answer"; + exit $ERRORS{$state}; +} diff --git a/monitoring-plugins-1.4.14-check_log.patch b/monitoring-plugins-1.4.14-check_log.patch new file mode 100644 index 0000000..166e91c --- /dev/null +++ b/monitoring-plugins-1.4.14-check_log.patch @@ -0,0 +1,85 @@ +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" diff --git a/monitoring-plugins-1.4.14-ntpd.patch b/monitoring-plugins-1.4.14-ntpd.patch new file mode 100644 index 0000000..9550cb2 --- /dev/null +++ b/monitoring-plugins-1.4.14-ntpd.patch @@ -0,0 +1,12 @@ +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)'; + } + + } diff --git a/monitoring-plugins-1.4.6-no_chown.patch b/monitoring-plugins-1.4.6-no_chown.patch new file mode 100644 index 0000000..63913e4 --- /dev/null +++ b/monitoring-plugins-1.4.6-no_chown.patch @@ -0,0 +1,56 @@ +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 +@@ -1341,7 +1341,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 +@@ -1782,11 +1781,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: diff --git a/monitoring-plugins-2.0.tar.bz2 b/monitoring-plugins-2.0.tar.bz2 new file mode 100644 index 0000000..c1daa2b --- /dev/null +++ b/monitoring-plugins-2.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da55221547d56d680810c57ca943a83806aa38902c9afd3e44cda8d780fbff98 +size 2209391 diff --git a/monitoring-plugins-README.SUSE b/monitoring-plugins-README.SUSE new file mode 100644 index 0000000..099d2ae --- /dev/null +++ b/monitoring-plugins-README.SUSE @@ -0,0 +1,25 @@ +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. + +== Special permissions for some plugins == + +The following checks require special handling as they need some root privileges to run: +* check_dhcp +* check_icmp +* check_ide_smart + +In a default installation, those checks will not work if executed as user with limited +rights (such as nagios or icinga). Please have a look into the corresponding documentation +for those packages for more details. +( /usr/share/doc/packages/nagios-plugins-icmp/README.SUSE-check_icmp for example ) + diff --git a/monitoring-plugins-README.SUSE-check_cups b/monitoring-plugins-README.SUSE-check_cups new file mode 100644 index 0000000..3fa2495 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_cups @@ -0,0 +1,120 @@ +README.SUSE for nagios-plugins-dhcp + +== check_cups == + +Nagios plugin for checking cups service + +This plug-in will check the status of a remote CUPS print service for the printer status, +Its able to check all available printers on the cups, or just one of them. +(for example if you have testing printer - is normally disable/off you don't need to check it.) +It can also check only the queue status. it will provide the size of the queue and +optionally the age of the queue. + +Generally I sugesst to create separate check for each printer only and then additional check for +the queue itself. + +it using Nagios standards exit codes: + +# Nagios return codes +STATE_OK=0 +STATE_WARNING=1 +STATE_CRITICAL=2 +STATE_UNKNOWN=3 +STATE_DEPENDENT=4 + +Usage: check_cups -H -P -p | -Q -w -c -a + +Notes: +-H: Hostname - Can be a hostname or IP address. +-P: Check only the printers status. +-p: It will check only one specific printer. +-Q: Type of check - Can be queue size (s) or both queu size and queue age (b) +-w: WARNING level for queue size +-c: CRITICAL level for queue size +-a: Max age of queue. Returns CRITICAL if jobs exists older than days + +Example of test run usage: +---------------- +Test all available printers and the queue. +(queue size warning is 3, critical 10 and max age 3 days): + +nagios@nagios:~> /usr/lib/nagios/plugins/check_cups -H cups.server.org -P -Q s -w 3 -c 10 -a 3 + +Checking all printers... +OK - CUPS printer is idle. +Testing queue on the CUPS... +OK: CUPS queue size - 0| print_jobs=0;3;10;0 + +Test one printer only : +nagios@nagios:~> /usr/lib/nagios/plugins/check_cups -H cups.suse.cz -P -p myprinter + +Checking only the printer myprinter. +OK - CUPS printer myprinter is idle. + +Test only the queue, do not test any printer +(queue size warning is 3, critical 5 and max age 2 days): + +nagios@nagios:~> /usr/lib/nagios/plugins/check_cups -H cups.suse.cz -Q b -w 3 -c 5 -a 2 +No printer check is require. Checking the queue ... +Testing queue on the CUPS... + +OK: CUPS queue size - 0| print_jobs=0;3;5;0 + +Example of Nagios/Icinga command settings: +---------------------------------- + +Example commands/check_cups.cfg: + +# Check all printers in cups and queue size and queue age +define command{ + command_name check_cups_all_queue + command_line $USER1$/check_cups -H $ARG1$ -P -Q b -w $ARG2$ -c $ARG3$ -a $ARG4$ +} + +# Check one printer in cups and queue size and queue age +define command{ + command_name check_cups_one_queue + command_line $USER1$/check_cups -H $ARG1$ -P -p $ARG2$ -Q b -w $ARG3$ -c $ARG4$ -a $ARG5$ +} + +# Check all printers in cups and queue size and queue age +define command{ + command_name check_cups_all + command_line $USER1$/check_cups -H $ARG1$ -P +} + +# Check one printer in cups. +define command{ + command_name check_cups_one + command_line $USER1$/check_cups -H $ARG1$ -P -p $ARG2$ +} + +# Check only the queue +define command{ + command_name check_cups_queue + command_line $USER1$/check_cups -H $ARG1$ -Q b -w $ARG2$ -c $ARG3$ -a $ARG4$ +} + + +Security: +--------- +In the version 0.2 I add appamor profile for the script usr.lib.nagios.plugins.check_cups +into /etc/apparmor.d + + +Autor notes: +------------ +I`d like to thank to John E. Vincent (nagios-plugs@lusis.org) +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 + + +Bugs: +------ +Please report bugs to me mcaj@suse.cz + +Thanks and have lot printers online ;-) +Martin diff --git a/monitoring-plugins-README.SUSE-check_dhcp b/monitoring-plugins-README.SUSE-check_dhcp new file mode 100644 index 0000000..aa91295 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_dhcp @@ -0,0 +1,54 @@ +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-common/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 + +or (on newer openSUSE distributions without SuSEconfig): +~ # chkstat --system --set + +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 + } + + + diff --git a/monitoring-plugins-README.SUSE-check_icmp b/monitoring-plugins-README.SUSE-check_icmp new file mode 100644 index 0000000..6600392 --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_icmp @@ -0,0 +1,42 @@ +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 + +or (on newer openSUSE distributions without SuSEconfig): + +~ # chkstat --system --set + +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 + } + + + diff --git a/monitoring-plugins-README.SUSE-check_ide_smart b/monitoring-plugins-README.SUSE-check_ide_smart new file mode 100644 index 0000000..6f6160a --- /dev/null +++ b/monitoring-plugins-README.SUSE-check_ide_smart @@ -0,0 +1,42 @@ +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 + +or (on newer openSUSE distributions without SuSEconfig): + +~ # chkstat --system --set + +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 + } + + + diff --git a/monitoring-plugins-permissions b/monitoring-plugins-permissions new file mode 100644 index 0000000..ffe8f83 --- /dev/null +++ b/monitoring-plugins-permissions @@ -0,0 +1,18 @@ +# 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' +# or (on newer openSUSE distributions without SuSEconfig): +# 'chkstat --system --set' +# 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 diff --git a/monitoring-plugins-postgresql.patch b/monitoring-plugins-postgresql.patch new file mode 100644 index 0000000..a700cd3 --- /dev/null +++ b/monitoring-plugins-postgresql.patch @@ -0,0 +1,12 @@ +Index: plugins/check_pgsql.c +=================================================================== +--- plugins/check_pgsql.c.orig ++++ plugins/check_pgsql.c +@@ -36,6 +36,7 @@ const char *email = "devel@monitoring-pl + #include "utils.h" + + #include "netutils.h" ++#include + #include + #include + diff --git a/monitoring-plugins-rpmlintrc b/monitoring-plugins-rpmlintrc new file mode 100644 index 0000000..9098c22 --- /dev/null +++ b/monitoring-plugins-rpmlintrc @@ -0,0 +1,5 @@ +# the virtual dbi-{mysql,pgsql,sqlite3} packages are there to require +# the needed library for the generic dbi package. +addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-mysql"); +addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-sqlite3"); +addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-pgsql"); diff --git a/monitoring-plugins-too_few_arguments_for_check_disk.patch b/monitoring-plugins-too_few_arguments_for_check_disk.patch new file mode 100644 index 0000000..75fc8f8 --- /dev/null +++ b/monitoring-plugins-too_few_arguments_for_check_disk.patch @@ -0,0 +1,13 @@ +Index: plugins/check_disk.c +=================================================================== +--- plugins/check_disk.c.orig ++++ plugins/check_disk.c +@@ -996,7 +996,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 */ diff --git a/monitoring-plugins-wrong_return_in_check_swap.patch b/monitoring-plugins-wrong_return_in_check_swap.patch new file mode 100644 index 0000000..79a88f3 --- /dev/null +++ b/monitoring-plugins-wrong_return_in_check_swap.patch @@ -0,0 +1,44 @@ +From f3e6c9663369d011b241c6fb2c8fd5312f98cacf Mon Sep 17 00:00:00 2001 +From: Jan ONDREJ +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: monitoring-plugins-2.0/plugins/check_swap.c +=================================================================== +--- monitoring-plugins-2.0.orig/plugins/check_swap.c ++++ monitoring-plugins-2.0/plugins/check_swap.c +@@ -125,7 +125,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)); diff --git a/monitoring-plugins.changes b/monitoring-plugins.changes new file mode 100644 index 0000000..5eeb283 --- /dev/null +++ b/monitoring-plugins.changes @@ -0,0 +1,1003 @@ +------------------------------------------------------------------- +Tue Jul 15 13:05:27 UTC 2014 - lars@linux-schulserver.de + +- update to 2.0: + Enhancements + + check_mailq now supports auto detection of qmail, postfix, exim + and nullmailer with fallback to sendmail + + check_ide_smart now defaults to plugin output, original + output appended with -v + + Extra-Opts are now enabled by default + + check_swap now supports a configurable state when there is no swap + + check_radius now supports the FreeRADIUS Client library + + New check_mysql_query -f option to specify a client options file + + New check_mysql_query -g option to specify a client options group + + Add performance data to check_mysql_query + + New check_file_age -i/--ignore-missing option to return OK on + nonexistent files + + Make check_ping, check_users, and check_disk work on Windows + + New check_ssh -P option to specify the expected SSH protocol version + + check_dns now emits the warning and critical thresholds with + the performance data + Fixes + + Don't let e.g. check_http's -C option reset SSL version + if e.g. -S 1 -C 5 is specified + + Don't have check_http's -N option expect an argument + + check_ide_smart could disable offline auto-tests but could not re-enable + them. For this reason all SMART command modes have been disabled + + check_dig: fix wrong IPv6 arguments order (Stéphane Bortzmeyer) + + check_dig: make sure not to give up too early when a timeout is + specified with -t + + check_log: don't stumble over log lines that include a % character + + check_nt: add UPTIME to perfdata + + Handle SNMPv3 noAuthNoPriv properly with check_snmp + + Fix compilation with GnuTLS + Warnings + + check_snmp now evaluates negative values properly, which means it + might return CRITICAL in cases where it used to return OK. If this + is undesired, the warning/critical threshold(s) must be fixed by + specifying e.g. ~:100 instead of 100 + + check_procs now ignores its parent process to avoid unexpected results + when invoked via certain shells + + utils.sh no longer defines ECH + + check_ide_smart -q/--quiet and -n/--nagios (Nagios-compatible output) + are now deprecated but accepted for backward-compatibility + + check_ide_smart -0/--auto-off, -1/--auto-on and -i/--immediate: + options have been disabled because they were broken + + State retention: the NAGIOS_PLUGIN_STATE_DIRECTORY environment + variablew has been renamed MP_STATE_PATH. + The old variable will continue to work in v2.0.x + + Add the UID of the invoking user to the state retention file path. + This helps solving permission issues when different users run the same plugin + + check_swap used to allow returning OK on a system without swap when + only percent thresholds were used. + This is no longer the case and one must now use -n/--no-swap= +- enable check_radius on never openSUSE distributions + +------------------------------------------------------------------- +Sun Jan 19 01:47:43 UTC 2014 - lars@linux-schulserver.de + +- adapt URL to new upstream page (bnc#859105) + +------------------------------------------------------------------- +Sun Dec 22 11:14:55 UTC 2013 - jcnengel@gmail.com + +- Add SNMPv3 context support to check_snmp following an idea of + Lars Mathwig + +------------------------------------------------------------------- +Wed Nov 27 19:56:08 UTC 2013 - msvec@suse.com + +- Get rid of the old SUSE spelling in READMEs + +------------------------------------------------------------------- +Tue Nov 19 11:37:39 UTC 2013 - schneemann@b1-systems.de + +- update to 1.5 + * removed contrib directory + * New check_dbi plugin for checking an (SQL) database using DBI + * Let OpenSSL load its configuration file (see the + OPENSSL_config(3) man page) + * Add performance data to check_apt + * Add performance data to check_procs + * Added -4/-6 options to check_dig + * New check_oracle --connect option to perform real login + * New check_nagios -t option to override the default timeout + * New check_disk -f/--freespace-ignore-reserved option to + ignore space reserved for root + * New check_disk -N/--include-type option to limit the filesystem + types to check + * Allow for building the plugins in parallel + * Add --without-{dbi,ldap,radius} options to ./configure + * Made Verbose output of check_sensors compliant + * New switch -E/--extended-perfdata for check_http to print + additional performance data + * New check_http -d option to specify a string to expect within + the response headers + * New check_http -J/-K options for client certificate + authentication support + * Add support for executing queries to check_pgsql + * Let check_pgsql accept a UNIX socket directory as hostname + * New check_pgsql -o option to specify additional connection parameters + * New check_fping -S option to specify the source IP address + * New check_fping -I option to specify the interface to bind to + * Let check_fping support IPv6 + * New check_procs -k option to ignore kernel threads (on Linux) + * Let check_procs use /proc//exe (if available) instead of + getpid(2), unless -T is specified + * Let check_mysql support SSL + * Let check_mysql add perfromance metrics for all checks + * New check_mysql -f option to specify a client options file + * New check_mysql -g option to specify a client options group + * New check_snmp --offset option to allow for adding/substracting + an offset value to sensor data + * Let check_snmp support an arbitrary number of OIDs + + * Fixes: + + Change the MAIL FROM command generated by check_smtp to be + RFC compliant + + Fix compilation of check_http without SSL support + + Fix check_snmp reversed threshold ranges + (backward-compatibility) + + Fix check_snmp memory violation when using more than 8 OIDs + + Fix check_apt security regular expression + + Fix check_http handling extra header (-k) containing semicolons + + Fix check_apt handling unknown exit codes from apt-get + + Fix deprecated imports of check_nmap.py + + +------------------------------------------------------------------- +Wed Oct 23 17:00:38 UTC 2013 - opensuse@cboltz.de + +- update apparmor profiles usr.lib.nagios.plugins.check_cups and + usr.lib.nagios.plugins.check_ping with /usr/bin/ paths (bnc#847229) + +------------------------------------------------------------------- +Fri Aug 30 11:14:59 UTC 2013 - lars@linux-schulserver.de + +- allow family="inet6" sock_type="raw" in apparmor profile for + check_ping + +------------------------------------------------------------------- +Tue Aug 13 10:37:17 CEST 2013 - ro@suse.de + +- update apparmor profile for ntp check (added nameservice) + +------------------------------------------------------------------- +Sun Aug 11 23:46:52 UTC 2013 - lars@linux-schulserver.de + +- add capabilities sys_admin and sys_rawio to ide_smart check + +------------------------------------------------------------------- +Mon Aug 5 14:10:18 CEST 2013 - ro@suse.de + +- add apparmor profiles for these checks: + icmp, ide_smart, ping, ssh + +------------------------------------------------------------------- +Wed Jul 17 13:01:40 UTC 2013 - lars@linux-schulserver.de + +- enhance the documentation for checks with special privileges + +------------------------------------------------------------------- +Thu May 23 13:50:14 UTC 2013 - opensuse@dstoecker.de + +- add check_procs_perf plugin + +------------------------------------------------------------------- +Fri Feb 22 15:08:06 UTC 2013 - lars@linux-schulserver.de + +- release for 12.1 & 12.2 as update: fixes bnc #778970 & bnc #789428 + +------------------------------------------------------------------- +Fri Feb 1 15:04:09 UTC 2013 - lars@linux-schulserver.de + +- added nagios-plugins-cups from mcaj@suse.cz +- 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 - ro@suse.de + +- allow name resolving for check-ntp plugin in apparmor config + +------------------------------------------------------------------- +Tue Dec 25 18:41:36 UTC 2012 - lars@linux-schulserver.de + +- 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 - ro@suse.de + +- skip sensors package also for s390 and s390x + +------------------------------------------------------------------- +Mon Nov 5 20:59:17 UTC 2012 - lars@linux-schulserver.de + +- enhance apparmor profile for check_ntp_time (IPv6 support) + +------------------------------------------------------------------- +Thu Oct 11 12:32:27 UTC 2012 - lars@linux-schulserver.de + +- nagios-plugins-nagios can also check icinga + -> require 'monitoring_daemon' + +------------------------------------------------------------------- +Sat Jul 28 14:30:46 UTC 2012 - aj@suse.de + +- Fix build with missing gets declaration (glibc 2.16) + +------------------------------------------------------------------- +Thu Jul 12 22:08:08 UTC 2012 - lars@linux-schulserver.de + +- 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 - lars@linux-schulserver.de + +- fix permissions of apparmor profile files + +------------------------------------------------------------------- +Mon Jun 4 12:48:57 UTC 2012 - lars@linux-schulserver.de + +- 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 - ro@suse.de + +- teach check_by_ssh old options -w and -c again + +------------------------------------------------------------------- +Mon May 21 11:53:36 UTC 2012 - badshah400@gmail.com + +- 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 - lars@linux-schulserver.de + +- 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 - lars@linux-schulserver.de + +- 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 - lars@linux-schulserver.de + +- do not package check_xenvm on ix86 as this setup is (no longer) + supported + +------------------------------------------------------------------- +Wed Apr 25 07:24:33 UTC 2012 - lars@linux-schulserver.de + +- 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 - lars@linux-schulserver.de + +- 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 - lars@linux-schulserver.de + +- 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 - lars@linux-schulserver.de + +- add GPL-3.0 implicitely to fix bnc #677711 + +------------------------------------------------------------------- +Wed Feb 8 16:58:49 UTC 2012 - lars@linux-schulserver.de + +- added hint to permissions file to nagios-plugins-README.SuSE + +------------------------------------------------------------------- +Tue Oct 18 13:58:38 UTC 2011 - chris@computersalat.de + +- fix missing Group in subpkg +- remove Author from Description + +------------------------------------------------------------------- +Fri Aug 12 20:28:29 UTC 2011 - lars@linux-schulserver.de + +- use nagios-rpm-macros rpm now to define global macros +- use the following patches from Debian: + + 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 +- split up nagios-plugins-fping package, and recommend it in + nagios-plugins-extras for backwards compatibility +- disable rpath in configure +- sort configure arguments alphabetical +- install check_bgpstate check in nagios-plugins-check_bgpstate + package +- remove .pl endings from check_netapp and check_linux_raid, but + provide symlinks for backwards compatibility +- provide check_host and check_rta_multi for users changing from + Debian + +------------------------------------------------------------------- +Mon Aug 1 19:51:08 UTC 2011 - lars@linux-schulserver.de + +- added info about check_dhcp in README.SuSE (see bnc #640367) + +------------------------------------------------------------------- +Fri Oct 8 12:28:26 UTC 2010 - coolo@novell.com + +- unfuzz patch + +------------------------------------------------------------------- +Wed Jul 28 13:54:03 UTC 2010 - schneemann@b1-systems.de + +- removed zlib from Requires to make rpmlint happy +- update to 1.4.15 +- removed 1.4.14 specific Patches + +- fixes through update: + * Fix check_ircd binding to wrong interface (#668778) + * Add proxy-authorization option to check_http (Marcel Kuiper - + #1323230, Bryan Irvine - #2863925) + * check_icmp now increment the sequence counter in each packet + * Fix usage of repeated -o options in check_snmp + * Try to detect arguments passed via --with-ping[6]-command and + set options accordingly (#2908236) + * Fix memory leak in check_http for large pages + (Jimmy Bergman - #2957455) + * Fix compilation with GCC 2.96 (Konstantin Khomoutov - #2977105) + * Fix regression introduced in #1867716 where partially valid + performance strings would not be printed anymore + * Fix regression in check_http ssl checks on some servers - + make SNI an option + * Fix guest mode support in check_disk_smb + * Fix check_disk_smb and check_ircd failures when run via ePN + * check_ldap now allows for specifying an empty LDAP base + * Fix compilation error of pst3 in Solaris 8 + * Fix check_radius returning OK on unexpected results + (Craig Leres - #2911752) + * Fix translations when extra-opts aren't enabled + (Jan Wagner - #2832884) + * Fix parsing of multi-line strings in check_snmp (broken in 1.4.14) + and enhance output in such case (#2832451) + * Fix detection of pst3 64-bit compile flags with Sun CC + * Fix cmd_run overwriting the environment, which would break + some commands that needed it + * Allow check_ifstatus to accept version=2c - used to only allow + version=2 (Brian Landers) + * Fix examples in check_disk, where it implied was possible to + suffix unit values to warn/crit parameters + +------------------------------------------------------------------- +Fri Jun 18 07:49:03 UTC 2010 - lars@linux-schulserver.de + +- enable ipv6 usage (looks like default configure does not detect + this right) +- define ping6 commandline in configure +- added Patches from Debian: + + check_game_cmdline.patch + + check_smtp_help.patch + + check_snmp_perfdata.patch + +------------------------------------------------------------------- +Sun Dec 20 18:07:17 UTC 2009 - coolo@novell.com + +- add nagios-plugins-1.4.14-implicit_decl.patch to spec file + +------------------------------------------------------------------- +Tue Dec 15 11:50:05 UTC 2009 - lars@linux-schulserver.de + +- enhanced the documentation in the example permissions file + +------------------------------------------------------------------- +Sun Dec 13 17:18:22 UTC 2009 - lars@linux-schulserver.de + +- added run_permissions in post in case somebody uses the delivered + example file + +------------------------------------------------------------------- +Sun Dec 6 12:58:46 CET 2009 - lars@linux-schulserver.de + +- enabled extra-opts +- fix pathnames to ntp commands +- remove check_sensors on archs with no support for it +- added the following patches: + + nagios-plugins-1.4.14-ntpd.patch (remove wrong comment) + + nagios-plugins-1.4.14-check_log.patch (fix pathnames) + + nagios-plugins-1.4.14-command_cfg.patch (fix pathnames) + + nagios-plugins-1.4.14-nmap.patch (fix tempdir) + + nagios-plugins-1.4.14-check_inodes.patch (initialize vars) + + nagios-plugins-1.4.14-implicit_decl.patch (fix implicit decl.) + + nagios-plugins-1.4.14-check_ircd.patch (Make it working on + multihomed host - thanks to ultrotter@debian.org) + +------------------------------------------------------------------- +Tue Nov 24 22:11:14 UTC 2009 - crrodriguez@opensuse.org + +- refresh patches wit fuzz=0 + +------------------------------------------------------------------- +Wed Sep 16 12:25:32 CEST 2009 - cschneemann@suse.de + +- update to 1.4.14 + for a full list of changes have a look at + /usr/share/doc/packages/nagios-plugins/ChangeLog + +------------------------------------------------------------------- +Sat Jul 25 10:40:23 CEST 2009 - cschneemann@suse.de + +- moved example file command.cfg to doc directory, the nagios package + brings its own configuration files, this command.cfg confuses + +------------------------------------------------------------------- +Wed Jul 8 13:42:23 CEST 2009 - cschneemann@suse.de + +- added parameters to configure in spec to get more information from + check_proc (bnc#519240) + +------------------------------------------------------------------- +Fri Jun 5 09:24:33 CEST 2009 - chris@computersalat.de + +- added contrib to doc +- spec mods + * cleanup specfile + o RPM Tags + * fixed deps on sub-pkg extras + * use of rpm macros + * add S:11, S:12 in prep + * simplify filelist for libexecdir + o checks for extras pkg are excluded in main pkg + * reworked files for doc + +------------------------------------------------------------------- +Fri May 15 12:38:22 CEST 2009 - cschneemann@suse.de + +- fixed buffer overflow in check_ntp_peer (bnc#498669) + +------------------------------------------------------------------- +Wed Mar 4 15:37:17 CET 2009 - lrupp@suse.de + +- added accidentally removed README and example again + +------------------------------------------------------------------- +Thu Sep 25 12:11:56 CEST 2008 - cschneemann@suse.de + +- update to 1.4.13: + + Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen) + + Fix Debian bug #479013: check_dig's -l is mandatory now + (sf.net #1986306) + + check_dig now returns CRITICAL instead of WARNING when no answer + section is found + + check_procs now captures stderr in external command and adds to + plugin output + + check_snmp now only prints perfdata for non numeric values + (sf.net #1867716) + + check_icmp now supports packet size modification + + check_http -e now accepts a comma-delimited list of expected + status codes (Sven Nierlein) + + libtap now included with this distribution for easier testing. + Run ./configure with --enable-libtap + + check_ntp_peer/check_ntp_time used to show port in + --help but ignored the argument - now implemented + + Fix possible segfault in check_ntp_peer with deliberately + invalid packets + +------------------------------------------------------------------- +Mon Sep 15 19:06:03 CEST 2008 - lrupp@suse.de + +- compile explicit without included regex +- add README about suid permissions + +------------------------------------------------------------------- +Fri Jul 25 19:15:35 CEST 2008 - lrupp@suse.de + +- fix lib path for perl plugins +- add check_linux_raid.pl and check_netapp.pl + +------------------------------------------------------------------- +Mon Jul 21 18:24:49 CEST 2008 - lrupp@suse.de + +- update to 1.4.12: + + Fixed check_http regression in 1.4.10 where following + redirects to relative URLs on virtual hosts failed if + both "-H" and "-I" were used + + Merged two new checks that deprecates check_ntp: + check_ntp_peer and check_ntp_time. + You should read the --help output so see which one is suitable + for you. + ++ check_ntp_peer implement stratum thresholds support + (feature request nagios-bt#1703823). + ++ check_ntp now returns UNKNOWN instead of WARNING if jitter + is unavailable (jitter=-1.000000) as long as the thresholds + range include -1. If no offset threshold is specified and the + offset is unavailable, will return UNKNOWN as well. + + Fixed broken usage2 in check_snmp and check_cluster + + check_cluster now accepts all valid characters in + its thresholds ("-", "@", "~") + + Fixed check_disk reporting OK if disk usage grows + over 100% (nagios-bt#1348746). + + Fixed check_load argument handling when not passing + triplets (nagios-bt#1831890) + + Fixed buffer overflow in check_snmp (CVE-2007-5623) + + Tinderbox builds now runs tests in a verbose mode + + Updated Nagios::Plugin to 0.22 + + VPATH problem fixed for compiling plugins-root +- disabled nagios-plugins-1.4.5-check_procs.c.patch (upstream has + another solution) +- BuildRequires nagios-devel now +- package check_linux_raid + +------------------------------------------------------------------- +Mon May 5 15:58:36 CEST 2008 - olh@suse.de + +- fix return type of validate_arguments() in negate.c + +------------------------------------------------------------------- +Thu Apr 17 14:18:55 CEST 2008 - max@suse.de + +- NAMEDATALEN is defined in pg_config_manual.h in PostgreSQL 8.3. + +------------------------------------------------------------------- +Mon Mar 10 14:48:34 CET 2008 - olh@suse.de + +- add check_xenvm + (from http://www.novell.com/coolsolutions/feature/19490.html) + +------------------------------------------------------------------- +Wed Jan 30 16:03:40 CET 2008 - lrupp@suse.de + +- enabled check_apt and check_game (in extras package) +- rpcinfo-, qstat- and apt-get-command need pathnames + (to avoid extra BuildRequires) +- make all plugins executable +- package commands.cfg to /etc/nagios +- package CODING file in docdir +- check_radius is currently broken +- BuildRequire nagios-devel +- build parallel +- added gnutls to BuildRequires + +------------------------------------------------------------------- +Fri Jan 4 10:19:37 CET 2008 - olh@suse.de + +- update to version 1.4.11 + * Fix check_http regression in 1.4.10 where following redirects to + relative URLs on virtual hosts failed if both "-H" and "-I" were used + * check_ntp now return UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000) + as long as the thresholds range inculde -1. If no offset threshold is specified + and the offset is unavailable, will return UNKNOWN as well. + NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter + is "-1" as the default range starts at 0. See Examples in --help output. + * Fix broken usage2 in check_snmp and check_cluster + * check_cluster now accept all valid characters in its thresholds ("-", "@", "~") + * Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time. + * Fix check_disk reporting OK if disk usage grows over 100% (bug #1348746). + The problem happens to be in Gnulib but a workaround have been implemented in check_disk.c + * Fix check_load argument handling when not passing triplets (bug #1831890) + +------------------------------------------------------------------- +Fri Oct 26 13:51:51 CEST 2007 - olh@suse.de + +- fix possible buffer overflow in check_snmp with snmpget replies (336002) + fix possible buffer overflow in check_http with redirects (331728) + +------------------------------------------------------------------- +Mon Oct 8 11:28:16 CEST 2007 - olh@suse.de + +- fix string check in check_snmp + +------------------------------------------------------------------- +Mon Oct 8 11:10:41 CEST 2007 - olh@suse.de + +- update to version 1.4.10 (331728) + * Fix check_http buffer overflow vulnerability when following HTTP redirects + * check_http now explicitly asks HTTP/1.1 servers to close the connection + after completion of the response + * Check_ldaps' guessing which secure method to use (starttls vs. ssl on connect) + is now deprecated. See --help for further information. + * Check_disk now calls stat() on all filesystems to check. (Old: only the ones selected using -p) + A meaningful error message (eg "Stale NFS Handle") is printed if stat fails. + * New check_disk option -L: Only check local filesystems, but call stat() on remote ones, too. + Thus accessibility of remote filesystems can be checked without any threshold comparison. + * Check_disk's --help now prints some examples for the new features introduced in 1.4.8 + * New check_disk -i/-I option to ignore pathes/partitions based on regular expressions + * New check_disk -A option to select all filesystems explicitly + WARNING: check_disk's -E option must now be passed before -p or -r/-R arguments + Passing -E after -p or -r results in UNKNOWN state, now + This is needed due to the new ignore feature + * Fix check_disk bug when mixing case sensitive and case insensitive regex arguments + * New check_dhcp -u/--unicast option for emulating a DHCP relay in order + to check DHCP servers on remote networks + * New check_dhcp -m/--mac option which allows for specifying the MAC + address to use in the DHCP request + * The check_dhcp -r and -s options now accept host names, too + * Fix possible check_icmp bus errors on some (non-x86/AMD64) platforms + * Fix check_smtp's handling of multiple-packet server responses + WARNING: Fix for negate which may break existing commands: + - stop evaluating command line options through shell twice + - enforce a full path for the command to run + * The "negate" utility can now remap custom states + * Check_radius now supports radiusclient-ng + * The (undocumented) positional parameter parsing which check_radius used + instead of getopt(3) if 8 arguments were given is no longer available + * Check_by_ssh now supports multiline output + * IPv6 support can now be disabled using ./configure --without-ipv6 + * Fix check_ntp now honor ntp flags + +------------------------------------------------------------------- +Wed Aug 15 21:17:17 CEST 2007 - olh@suse.de + +- require freeradius-client-devel only in openSuSE > 10.2 + +------------------------------------------------------------------- +Wed Aug 15 20:54:55 CEST 2007 - olh@suse.de + +- fix a few compile warnings +- update to version 1.4.9 + * Inclusion of contrib/check_cluster2 as check_cluster with some improvements + * New/improved -E/--skip-stderr and -S/--skip-stdout options for check_by_ssh + * check_snmp now supports Counter64 + * Fix compilation of check_ldap, check_radius and check_pgsql + * check_load can optionally divide by number of cpus + * Fix check_time returning wrong OK when time is before the epoch on some arch + * Make check_http output more consistent + * Fix possible check_http segfaults when following HTTP redirects + * check_snmp don't warn anymore if something is printed on stderr + * Fix check_tcp segfault when multiple expect strings are given + * New option for check_tcp: -A/--all to test if all given expect strings match + * Respects --without-world-permissions for setuid plugins + * check_disk extra options for regex matching of filesystems and grouping of filesystems + for collective thresholds + * Better configure test for mysqlclient availability + * Various check_ntp fixes + * check_procs uses /usr/ucb/ps if available - fixes pst3 problems on Solaris + * Fixed MKINSTALLDIRS problem in po/ + * ./configure now detects if possible to compile check_mysql + * Fixed broken HELO in check_smtp + * check_icmp now allows to set a minimum number of hosts required for successs (-m) + * check_icmp fix for *BSD when running for long time + * check_ping times out 1 second quicker if host is unreachable + * Root plugins installed with world executable + * check_sybase from contrib now maintained in NagiosExchange + * --with-nagios-user/group reinstated ./configure option + * New --without-world-permissions ./configure option + +------------------------------------------------------------------- +Fri Mar 30 01:34:09 CEST 2007 - ro@suse.de + +- added procps,bind-utils to buildreq + +------------------------------------------------------------------- +Thu Mar 15 01:55:30 CET 2007 - ro@suse.de + +- disable radius plugin for now, needs porting to freeradius-client + +------------------------------------------------------------------- +Thu Mar 15 00:52:00 CET 2007 - ro@suse.de + +- make it build as non-root +- check_dhcp and check_ are still not installed suid, but they + were not suid before this change + +------------------------------------------------------------------- +Mon Mar 12 16:00:09 CET 2007 - tsieden@suse.de + +- update to version 1.4.6 + * Reduced number of DNS lookups in check_ping and netutils.c for + IPv6 configurations + * Fixed compile problems with *BSD re: alloca.h + * Fixed Solaris problems with check_swap (tested on Solaris 9) + * Fixed check_swap for HP/UX where swapinfo command was incorrect + * Fixed check_disk inode threshold checks, regressed at r1.4.4. + * Fixed crit/warn for check_disk perf data + * Fixed buffer overflow in check_procs + * Fixed error handling for UNIX sockets in netutils.c + * New -q and -o options for check_by_ssh which are handed over to ssh(1) as is + * Synced with latest GNUlib + * Fixed check_jabber always returns warning +- removed ntp from BuildRequires +- adapted from BuildService: + * added more distribution-specific BuildRequires from mge@suse.de + +------------------------------------------------------------------- +Wed Jan 10 21:13:26 CET 2007 - olh@suse.de + +- remove outdated and unused command.cfg + +------------------------------------------------------------------- +Fri Nov 17 11:47:31 CET 2006 - tsieden@suse.de + +- fix build + * typos in check_http.c, check_icmp.c and check_ldap.c + * added missing include to check_procs.c + * fix more gcc warnings in check_fping.c, check_mysql.c and + check_mysql_query.c + +------------------------------------------------------------------- +Thu Nov 16 10:12:55 CET 2006 - tsieden@suse.de + +- update to version 1.4.5 + * check_udp2 removed. check_udp is now linked to check_tcp.c + * new check_apt plugin + * new C based check_ntp. the perl version is now + deprecated. + * major bug fixes to check_disk where values were incorrectly + calculated and alerted on. + * check_mailq now errors if the sub-program run returns + non-zero return code. this would appear as if mailqs were + okay when the nagios user could not query the mail-queues + * compile problems with check_snmp fixed + +------------------------------------------------------------------- +Wed Jun 21 19:40:50 CEST 2006 - stark@suse.de + +- update to version 1.4.3 + * check_mysql_query added to run arbitrary SQL commands, + with threshold checking + * new check_clamd + +------------------------------------------------------------------- +Fri Jun 16 23:37:34 CEST 2006 - schwab@suse.de + +- Fix syntax error in configure script. + +------------------------------------------------------------------- +Wed Jan 25 21:38:33 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Dec 19 15:10:04 CET 2005 - ro@suse.de + +- added previously unpackaged symlinks to extras package + +------------------------------------------------------------------- +Tue Oct 25 15:48:15 CEST 2005 - rhafer@suse.de + +- added LDAP_DEPRECATED to CFLAGS to build correctly with + OpenLDAP 2.3 + +------------------------------------------------------------------- +Tue Sep 20 06:47:30 CEST 2005 - stark@suse.de + +- update to version 1.4.2 + +------------------------------------------------------------------- +Tue Aug 2 06:40:05 CEST 2005 - stark@suse.de + +- update to version 1.4.1 + +------------------------------------------------------------------- +Tue May 17 12:33:12 CEST 2005 - stark@suse.de + +- fixed overwriting a buffer + +------------------------------------------------------------------- +Tue May 17 08:21:37 CEST 2005 - stark@suse.de + +- fixed ps syntax (bug 75699) + +------------------------------------------------------------------- +Fri Feb 4 10:16:35 CET 2005 - stark@suse.de + +- update to version 1.4 + +------------------------------------------------------------------- +Wed May 26 01:55:49 CEST 2004 - ro@suse.de + +- add some return values to non-void functions + +------------------------------------------------------------------- +Thu Dec 18 12:56:10 CET 2003 - stark@suse.de + +- adopted to new ping output format (iputils-ss021109) (#33710) + +------------------------------------------------------------------- +Mon Nov 10 15:05:16 CET 2003 - ro@suse.de + +- use net-snmp instead of ucdsnmp + +------------------------------------------------------------------- +Fri Jul 18 13:07:54 CEST 2003 - stark@suse.de + +- update to 1.3.1 + +------------------------------------------------------------------- +Thu Jun 19 13:47:58 CEST 2003 - stark@suse.de + +- added missing directories to filelist + +------------------------------------------------------------------- +Tue May 27 07:30:05 CEST 2003 - stark@suse.de + +- update to 1.3.0 + * added check_nt + +------------------------------------------------------------------- +Mon Dec 2 10:24:20 CET 2002 - stark@suse.de + +- update to 1.3.0beta2 + * included SNMPv3 patch + +------------------------------------------------------------------- +Thu Nov 21 01:21:43 CET 2002 - ro@suse.de + +- work around autoconf problem + +------------------------------------------------------------------- +Wed Oct 9 10:00:35 CEST 2002 - stark@suse.de + +- added nagios to neededforbuild (Bug #20557) + +------------------------------------------------------------------- +Sun Oct 6 06:01:25 CEST 2002 - stark@suse.de + +- moved Requires: perl-Net-SNMP from extras to "normal" package + (Bug #20559) +- removed Requires: nagios because it is also possible + to use it with nagios-nrpe + +------------------------------------------------------------------- +Thu Aug 1 00:56:50 CEST 2002 - ro@suse.de + +- use openldap2 as neededforbuild + +------------------------------------------------------------------- +Tue Jul 9 11:54:30 CEST 2002 - stark@suse.de + +- added patch to be able to connect via SNMPv3 (check_snmp) + +------------------------------------------------------------------- +Mon Jul 1 16:01:58 CEST 2002 - ro@suse.de + +- find mysql on lib64 + +------------------------------------------------------------------- +Wed Jun 19 09:09:38 CEST 2002 - stark@suse.de + +- switched to nagiosplug 1.3beta1 + (is stated as beta but should be usable in almost all cases) + +------------------------------------------------------------------- +Fri Jun 14 10:42:21 CEST 2002 - stepan@suse.de + +- add mysql-client to neededforbuild + +------------------------------------------------------------------- +Mon Apr 29 10:18:16 CEST 2002 - stark@suse.de + +- changed Requires to nagios + +------------------------------------------------------------------- +Tue Jan 15 09:35:09 CET 2002 - stark@suse.de + +- fixed check_ping to fit new ping output (#12769) + +------------------------------------------------------------------- +Wed Nov 7 14:20:40 CET 2001 - stark@suse.de + +- use AM_INIT_AUTOMAKE + +------------------------------------------------------------------- +Mon Aug 27 01:42:07 CEST 2001 - ro@suse.de + +- fix for current ping output (round-trip is called rtt now) +- bzip source + +------------------------------------------------------------------- +Mon Jul 30 08:40:54 CEST 2001 - stark@suse.de + +- added openssl to #neededforbuild + +------------------------------------------------------------------- +Fri Jul 27 08:57:43 CEST 2001 - kukuk@suse.de + +- change postgresql-lib -> postgresql-libs + +------------------------------------------------------------------- +Mon Jul 16 08:55:43 CEST 2001 - stark@suse.de + +- added mysql-shared to #neededforbuild + +------------------------------------------------------------------- +Tue Jul 10 08:15:00 CEST 2001 - stark@suse.de + +- package splitted (netsaint-plugins-extras for dependent functions +- added check_fping + +------------------------------------------------------------------- +Mon Jul 9 14:26:39 CEST 2001 - stark@suse.de + +- fixed #ifdef in check_mrtg.c, check_nwstat.c, check_by_ssh.c + +------------------------------------------------------------------- +Mon Jun 18 13:44:39 CEST 2001 - stark@suse.de + +- removed openldap-client from neededforbuild + +------------------------------------------------------------------- +Mon May 14 11:13:50 CEST 2001 - stark@suse.de + +- update to release 1.2.9-4 + +------------------------------------------------------------------- +Thu Apr 19 12:46:52 CEST 2001 - stark@suse.de + +- initial package 1.2.9-3 + diff --git a/monitoring-plugins.check_cups.sh b/monitoring-plugins.check_cups.sh new file mode 100644 index 0000000..3c350a7 --- /dev/null +++ b/monitoring-plugins.check_cups.sh @@ -0,0 +1,371 @@ +#!/bin/bash + +# check_cups - nagios plugin +# +# Copyright (C) 2008-2010, Novell, Inc. +# Copyright (C) 2011-2013, SUSE Linux Products GmbH +# Author: Martin Caj +# +# 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 (nagios-plugs@lusis.org) +# 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 + +# version 0.3 has no awk any more, cut can do it as well. +# the appamor profile was fix as well. +# Martin Caj 01/11/2013 + +# 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.3 + +#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 -P -p | -Q -w -c -a " + echo + echo "Notes:" + echo "-H: Hostname - Can be a hostname or IP address." + echo "-P: Check only the printers status." + 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 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" + echo "it can 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 " + echo "will return a CRITICAL" + echo "For more details have look into README file. " + 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*) + messages=$(echo "$RESULT"|grep -i rejecting ) + OUTPUT="CRITICAL - CUPS printer is rejecting jobs for: "$messages"." + exitstatus="$STATE_CRITICAL" + ;; + *Unable*) + messages=$(echo "$RESULT"|grep -i unable ) + OUTPUT="CRITICAL - CUPS Unable to connect: "$messages"." + exitstatus="$STATE_CRITICAL" + ;; + *disabled*) + messages=$(echo "$RESULT"|grep -i disabled) + OUTPUT="CRITICAL - CUPS printer: "$messages"." + exitstatus="$STATE_CRITICAL" + ;; + *Paused*) + messages=$(echo "$RESULT"|grep -i paused) + OUTPUT="WARNING: - CUPS printer is: "$messages"." + exitstatus="$STATE_WARNING" + ;; + *printing*) + OUTPUT="OK - CUPS printer is printing now." + exitstatus="$STATE_OK" + ;; + *idle*) + OUTPUT="OK - CUPS printer "$printername" is idle." + exitstatus="$STATE_OK" + ;; + *) + OUTPUT="CRITICAL - Unknown error occured while checking: "$RESULT"." + 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" + +# by default is test pritner disabled, you must allow it with -p $printer or -P all printers +testprinter="0" + + +# 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) + testprinter="2" + 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 [ $testprinter -eq 2 ] #Check specifics printer and continue with the script +then + check_printer_status "$printername" + + if [ -z $testtype ] # exits if there is no -Q checks + then + echo "$OUTPUT" + exit "$exitstatus" + fi +elif [ $testprinter -eq 1 ]; then # check all printers + check_printer_status + if [ -z $testtype ]; then # exits if there is no -Q checks + echo "$OUTPUT" + exit "$exitstatus" + fi +else # no cuos check is need + echo "No printer check is require. Checking the queue ..." +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 when using a test type of 'b'" + print_usage + exitstatus="$STATE_UNKNOWN" + exit "$exitstatus" +else + echo "Testing queue on the CUPS..." + 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 | cut -c50-73) + # 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" diff --git a/monitoring-plugins.check_ntp.c-64bit-portability-issue.patch b/monitoring-plugins.check_ntp.c-64bit-portability-issue.patch new file mode 100644 index 0000000..413ca2c --- /dev/null +++ b/monitoring-plugins.check_ntp.c-64bit-portability-issue.patch @@ -0,0 +1,13 @@ +Index: monitoring-plugins-2.0/plugins/check_ntp.c +=================================================================== +--- monitoring-plugins-2.0.orig/plugins/check_ntp.c ++++ monitoring-plugins-2.0/plugins/check_ntp.c +@@ -616,7 +616,7 @@ double jitter_request(const char *host, + if (bytes_read != ntp_cm_ints + req.count) + die(STATE_UNKNOWN, _("Invalid NTP response: %d bytes read does not equal %d plus %d data segment"), bytes_read, ntp_cm_ints, req.count); + /* else null terminate */ +- strncpy(req.data[req.count], "\0", 1); ++ req.data[req.count] = "\0"; + + DBG(print_ntp_control_message(&req)); + diff --git a/monitoring-plugins.check_snmp.arrayaddress.patch b/monitoring-plugins.check_snmp.arrayaddress.patch new file mode 100644 index 0000000..24f257f --- /dev/null +++ b/monitoring-plugins.check_snmp.arrayaddress.patch @@ -0,0 +1,13 @@ +Index: plugins/check_snmp.c +=================================================================== +--- plugins/check_snmp.c.orig ++++ plugins/check_snmp.c +@@ -567,7 +567,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); + } diff --git a/monitoring-plugins.check_snmp.snmpv3-context.patch b/monitoring-plugins.check_snmp.snmpv3-context.patch new file mode 100644 index 0000000..7bbdbab --- /dev/null +++ b/monitoring-plugins.check_snmp.snmpv3-context.patch @@ -0,0 +1,125 @@ +Index: monitoring-plugins-2.0/plugins/check_snmp.c +=================================================================== +--- monitoring-plugins-2.0.orig/plugins/check_snmp.c ++++ monitoring-plugins-2.0/plugins/check_snmp.c +@@ -104,6 +104,8 @@ int errcode, excode; + + char *server_address = NULL; + char *community = NULL; ++char **context = NULL; ++char *v3context = NULL; + char **authpriv = NULL; + char *proto = NULL; + char *seclevel = NULL; +@@ -128,6 +130,7 @@ size_t nunits = 0; + size_t unitv_size = OID_COUNT_STEP; + int numoids = 0; + int numauthpriv = 0; ++int numcontext = 0; + int verbose = 0; + int usesnmpgetnext = FALSE; + char *warning_thresholds = NULL; +@@ -297,8 +300,8 @@ main (int argc, char **argv) + snmpcmd = strdup (PATH_TO_SNMPGET); + } + +- /* 10 arguments to pass before authpriv options + 1 for host and numoids. Add one for terminating NULL */ +- command_line = calloc (10 + numauthpriv + 1 + numoids + 1, sizeof (char *)); ++ /* 10 arguments to pass before context and authpriv options + 1 for host and numoids. Add one for terminating NULL */ ++ command_line = calloc (10 + numcontext + numauthpriv + 1 + numoids + 1, sizeof (char *)); + command_line[0] = snmpcmd; + command_line[1] = strdup ("-Le"); + command_line[2] = strdup ("-t"); +@@ -310,23 +313,27 @@ main (int argc, char **argv) + command_line[8] = "-v"; + command_line[9] = strdup (proto); + ++ for (i = 0; i < numcontext; i++) { ++ command_line[10 + i] = context[i]; ++ } ++ + for (i = 0; i < numauthpriv; i++) { +- command_line[10 + i] = authpriv[i]; ++ command_line[10 + numcontext + i] = authpriv[i]; + } + +- xasprintf (&command_line[10 + numauthpriv], "%s:%s", server_address, port); ++ xasprintf (&command_line[10 + numcontext + numauthpriv], "%s:%s", server_address, port); + + /* This is just for display purposes, so it can remain a string */ +- xasprintf(&cl_hidden_auth, "%s -Le -t %d -r %d -m %s -v %s %s %s:%s", +- snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : "''", proto, "[authpriv]", ++ xasprintf(&cl_hidden_auth, "%s -Le -t %d -r %d -m %s -v %s %s %s %s:%s", ++ snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : "''", proto, "[context]", "[authpriv]", + server_address, port); + + for (i = 0; i < numoids; i++) { +- command_line[10 + numauthpriv + 1 + i] = oids[i]; ++ command_line[10 + numcontext + numauthpriv + 1 + i] = oids[i]; + xasprintf(&cl_hidden_auth, "%s %s", cl_hidden_auth, oids[i]); + } + +- command_line[10 + numauthpriv + 1 + numoids] = NULL; ++ command_line[10 + numcontext + numauthpriv + 1 + numoids] = NULL; + + if (verbose) + printf ("%s\n", cl_hidden_auth); +@@ -646,6 +653,7 @@ process_arguments (int argc, char **argv + {"retries", required_argument, 0, 'e'}, + {"miblist", required_argument, 0, 'm'}, + {"protocol", required_argument, 0, 'P'}, ++ {"context", required_argument, 0, 'N'}, + {"seclevel", required_argument, 0, 'L'}, + {"secname", required_argument, 0, 'U'}, + {"authproto", required_argument, 0, 'a'}, +@@ -675,7 +683,7 @@ process_arguments (int argc, char **argv + } + + while (1) { +- c = getopt_long (argc, argv, "nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:", ++ c = getopt_long (argc, argv, "nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:", + longopts, &option); + + if (c == -1 || c == EOF) +@@ -713,6 +721,9 @@ process_arguments (int argc, char **argv + case 'P': /* SNMP protocol version */ + proto = optarg; + break; ++ case 'N': /* SNMPv3 context */ ++ v3context = optarg; ++ break; + case 'L': /* security level */ + seclevel = optarg; + break; +@@ -960,6 +971,13 @@ validate_arguments () + authpriv[1] = strdup (community); + } + else if ( strcmp (proto, "3") == 0 ) { /* snmpv3 args */ ++ if (!(v3context == NULL)) { ++ numcontext = 2; ++ context = calloc (numcontext, sizeof (char *)); ++ context[0] = strdup ("-n"); ++ context[1] = strdup (v3context); ++ } ++ + if (seclevel == NULL) + xasprintf(&seclevel, "noAuthNoPriv"); + +@@ -1103,6 +1121,8 @@ print_help (void) + printf (" %s\n", _("Use SNMP GETNEXT instead of SNMP GET")); + printf (" %s\n", "-P, --protocol=[1|2c|3]"); + printf (" %s\n", _("SNMP protocol version")); ++ printf (" %s\n", "-N, --context=CONTEXT"); ++ printf (" %s\n", _("SNMPv3 context")); + printf (" %s\n", "-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]"); + printf (" %s\n", _("SNMPv3 securityLevel")); + printf (" %s\n", "-a, --authproto=[MD5|SHA]"); +@@ -1210,6 +1230,6 @@ print_usage (void) + printf ("%s -H -o [-w warn_range] [-c crit_range]\n",progname); + printf ("[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]\n"); + printf ("[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]\n"); +- printf ("[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]\n"); +- printf ("[-A authpasswd] [-x privproto] [-X privpasswd]\n"); ++ printf ("[-m miblist] [-P snmp version] [-N context] [-L seclevel] [-U secname]\n"); ++ printf ("[-a authproto] [-A authpasswd] [-x privproto] [-X privpasswd]\n"); + } diff --git a/monitoring-plugins.negate.validate_arguments.patch b/monitoring-plugins.negate.validate_arguments.patch new file mode 100644 index 0000000..63af04c --- /dev/null +++ b/monitoring-plugins.negate.validate_arguments.patch @@ -0,0 +1,26 @@ +--- + plugins/negate.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: plugins/negate.c +=================================================================== +--- plugins/negate.c.orig ++++ plugins/negate.c +@@ -44,7 +44,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 **); + int translate_state (char *); + void print_help (void); + void print_usage (void); +@@ -207,7 +207,7 @@ process_arguments (int argc, char **argv + } + + +-int ++void + validate_arguments (char **command_line) + { + if (command_line[0] == NULL) diff --git a/monitoring-plugins.spec b/monitoring-plugins.spec new file mode 100644 index 0000000..80908f8 --- /dev/null +++ b/monitoring-plugins.spec @@ -0,0 +1,1570 @@ +# +# spec file for package monitoring-plugins +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# 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/ +# + + +Name: monitoring-plugins +Summary: The Monitoring Plug-Ins +License: GPL-2.0+ and GPL-3.0 +Group: System/Monitoring +Version: 2.0 +Release: 0 +Url: http://monitoring-plugins.org/ +PreReq: permissions +Source0: %{name}-%{version}.tar.bz2 +Source1: %{name}-rpmlintrc +Source11: %{name}-permissions +Source12: %{name}-README.SUSE +Source13: %{name}-README.SUSE-check_dhcp +Source14: %{name}-README.SUSE-check_icmp +Source15: %{name}-README.SUSE-check_ide_smart +Source16: usr.lib.nagios.plugins.check_dhcp +Source17: usr.lib.nagios.plugins.check_ntp_time +Source18: %{name}.check_cups.sh +Source19: usr.lib.nagios.plugins.check_cups +Source20: %{name}-README.SUSE-check_cups +Source22: usr.lib.nagios.plugins.check_ping +Source23: usr.lib.nagios.plugins.check_icmp +Source24: usr.lib.nagios.plugins.check_ide_smart +Source25: usr.lib.nagios.plugins.check_ssh +Source26: check_ircd_ssl +Patch1: %{name}-1.4.14-ntpd.patch +Patch2: %{name}-1.4.14-check_log.patch +Patch6: %{name}-1.4.6-no_chown.patch +Patch11: %{name}.check_snmp.arrayaddress.patch +Patch12: %{name}-postgresql.patch +Patch13: %{name}.negate.validate_arguments.patch +Patch15: %{name}-too_few_arguments_for_check_disk.patch +Patch116: %{name}-wrong_return_in_check_swap.patch +Patch117: %{name}.check_snmp.snmpv3-context.patch +Patch118: %{name}.check_ntp.c-64bit-portability-issue.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: bind-utils +BuildRequires: dhcp-devel +BuildRequires: fping +%if 0%{?suse_version} > 1210 +BuildRequires: libgnutls-devel +%else +BuildRequires: gnutls-devel +%endif +BuildRequires: iputils +BuildRequires: libdbi-devel +BuildRequires: libsmbclient-devel +BuildRequires: mysql-devel +BuildRequires: nagios-devel +BuildRequires: nagios-rpm-macros +BuildRequires: net-snmp-devel +BuildRequires: openldap2-devel +BuildRequires: openssh +BuildRequires: openssl-devel +BuildRequires: perl-Net-SNMP +BuildRequires: postfix +BuildRequires: postgresql-devel +BuildRequires: procps +BuildRequires: python-devel +BuildRequires: samba-client +%if 0%{?suse_version} +%if 0%{?suse_version} > 1020 +BuildRequires: freeradius-client-devel +%else +BuildRequires: radiusclient +%endif +%if 0%{?suse_version} > 910 +BuildRequires: krb5-devel +BuildRequires: syslog-ng +%else +BuildRequires: heimdal-devel +%endif +%else +BuildRequires: krb5-devel +%endif +# recommend the old, included checks to allow an easy update - but +# also allow users to deselect some of the new sub-packages +Recommends: %{name}-bgpstate +Recommends: %{name}-breeze +Recommends: %{name}-by_ssh +Recommends: %{name}-cluster +Recommends: %{name}-dhcp +Recommends: %{name}-dig +Recommends: %{name}-disk +Recommends: %{name}-disk_smb +Recommends: %{name}-dns +Recommends: %{name}-dummy +Recommends: %{name}-file_age +Recommends: %{name}-flexlm +Recommends: %{name}-http +Recommends: %{name}-icmp +Recommends: %{name}-ide_smart +Recommends: %{name}-ifoperstatus +Recommends: %{name}-ifstatus +Recommends: %{name}-ircd +Recommends: %{name}-linux_raid +Recommends: %{name}-load +Recommends: %{name}-log +Recommends: %{name}-mailq +Recommends: %{name}-mrtg +Recommends: %{name}-mrtgtraf +Suggests: %{name}-nagios +Recommends: %{name}-nt +Recommends: %{name}-ntp_peer +Recommends: %{name}-ntp_time +Recommends: %{name}-nwstat +Recommends: %{name}-oracle +Recommends: %{name}-overcr +Recommends: %{name}-ping +Recommends: %{name}-procs +Recommends: %{name}-real +Recommends: %{name}-rpc +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +Recommends: %{name}-sensors +%endif +Recommends: %{name}-smtp +Recommends: %{name}-ssh +Recommends: %{name}-swap +Recommends: %{name}-tcp +Recommends: %{name}-time +Recommends: %{name}-ups +Recommends: %{name}-users +Recommends: %{name}-wave +Suggests: %{name}-cups +%define apt_get_command %{_bindir}/apt-get +%define qstat_command %{_bindir}/qstat + +%description +The actual service checks on current monitoring solutions like Icinga, +Nagios or Shinken (just to name a few) are performed by separate +"plugin" programs which return the status of the checks to the +running daemon. + +This package contains those plugins. + +%package extras +Summary: Plug-Ins which depend on additional packages +Group: System/Monitoring +Provides: nagios-plugins-extras = %{version}-%{release} +Obsoletes: nagios-plugins-extras < 1.5 +Suggests: %{name}-apt +Recommends: %{name}-fping +Suggests: %{name}-game +Requires: %{name}-common = %{version} +Recommends: %{name}-hpjd +Recommends: %{name}-ldap +Recommends: %{name}-mysql +Recommends: %{name}-pgsql +Recommends: %{name}-snmp + +%description extras +These are additional monitoring checks that require additional packages +which have to be installed. + +%package all +Summary: All Monitoring-Plugin checks +Group: System/Monitoring +Provides: nagios-plugins-all = %{version}-%{release} +Obsoletes: nagios-plugins-all < 1.5 +Recommends: %{name}-apt +Recommends: %{name}-bgpstate +Recommends: %{name}-bind +Recommends: %{name}-bonding +Recommends: %{name}-breeze +Recommends: %{name}-by_ssh +Recommends: %{name}-clamav +Recommends: %{name}-cluster +Recommends: %{name}-contentage +Recommends: %{name}-cups +Recommends: %{name}-dbi-mysql +Recommends: %{name}-dbi-pgsql +Recommends: %{name}-dbi-sqlite3 +Recommends: %{name}-dhcp +Recommends: %{name}-dig +Recommends: %{name}-disk +Recommends: %{name}-diskio +Recommends: %{name}-disk_smb +Recommends: %{name}-dns +Recommends: %{name}-dummy +Recommends: %{name}-file_age +Recommends: %{name}-flexlm +Recommends: %{name}-fping +Recommends: %{name}-game +Recommends: %{name}-hpasm +Recommends: %{name}-hpjd +Recommends: %{name}-http +Recommends: %{name}-icmp +Recommends: %{name}-ide_smart +Recommends: %{name}-ifoperstatus +Recommends: %{name}-ifstatus +Recommends: %{name}-ipmi-sensor1 +Recommends: %{name}-ircd +Recommends: %{name}-ldap +Recommends: %{name}-linux_raid +Recommends: %{name}-load +Recommends: %{name}-log +Recommends: %{name}-maintenance +Recommends: %{name}-mem +Recommends: %{name}-mailq +Recommends: %{name}-mrtg +Recommends: %{name}-mrtgtraf +Recommends: %{name}-mysql +Recommends: %{name}-mysql_health +Recommends: %{name}-nagios +Recommends: %{name}-nfsmounts +Recommends: %{name}-nis +Recommends: %{name}-nt +Recommends: %{name}-ntp_peer +Recommends: %{name}-ntp_time +Recommends: %{name}-nwstat +Recommends: %{name}-oracle +Recommends: %{name}-overcr +Recommends: %{name}-pgsql +Recommends: %{name}-ping +Recommends: %{name}-procs +Recommends: %{name}-qlogic_sanbox +Recommends: %{name}-radius +Recommends: %{name}-real +Recommends: %{name}-rpc +Recommends: %{name}-rsync +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +Recommends: %{name}-sensors +%endif +Recommends: %{name}-smtp +Recommends: %{name}-snmp +Recommends: %{name}-ssh +Recommends: %{name}-swap +Recommends: %{name}-tcp +Recommends: %{name}-time +Recommends: %{name}-ups +Recommends: %{name}-ups_alarm +Recommends: %{name}-users +Recommends: %{name}-wave +Recommends: nagios-xen-host +Recommends: %{name}-zypper + +%description all +This virtual package recommends all currently available, official +Monitoring plugins and additional packages that are available in +https://build.opensuse.org/project/show/server:monitoring + + +%if 0%{?suse_version} < 01310 +%package apt +Summary: Check for software updates via apt-get +Group: System/Monitoring +Requires: %{apt_get_command} +Provides: nagios-plugins-apt = %{version}-%{release} +Obsoletes: nagios-plugins-apt < 1.5 + +%description apt +This plugin checks for software updates on systems that use package management +systems based on the apt-get command found in Debian GNU/Linux or Ubuntu for +example. +%endif + +%package breeze +Summary: Monitor Breezecom wireless equipment +Group: System/Monitoring +Provides: nagios-plugins-breeze = %{version}-%{release} +Obsoletes: nagios-plugins-breeze < 1.5 +Requires: %{name}-common = %{version} +Requires: net-snmp +Requires: perl + +%description breeze +This plugin reports the signal strength of a Breezecom wireless equipment. + + +%package by_ssh +Summary: Execute checks via SSH +Group: System/Monitoring +Provides: nagios-plugins-by_ssh = %{version}-%{release} +Obsoletes: nagios-plugins-by_ssh < 1.5 +Requires: openssh + +%description by_ssh +This plugin uses SSH to execute commands on a remote host. + +The most common mode of use is to refer to a local identity file with +the '-i' option. In this mode, the identity pair should have a null +passphrase and the public key should be listed in the authorized_keys +file of the remote host. Usually the key will be restricted to running +only one command on the remote server. If the remote SSH server tracks +invocation arguments, the one remote program may be an agent that can +execute additional commands as proxy. + + +%package cluster +Summary: Host/Service Cluster Plugin +Group: System/Monitoring +Provides: nagios-plugins-cluster = %{version}-%{release} +Obsoletes: nagios-plugins-cluster < 1.5 + +%description cluster +Provides the check_cluster plugin to check Services and/or Hosts running +as a cluster. + +Example: + check_cluster -s -d 2,0,2,0 -c @3: +Will alert critical if there are 3 or more service data points in a non-OK +state. + + +%package common +Summary: Libraries for Nagios plugins +Group: System/Monitoring +Provides: nagios-plugins-common = %{version}-%{release} +Obsoletes: nagios-plugins-common < 1.5 + +%description common +This package includes the libraries (scripts) that are included by many +of the standard checks. + +%package dbi +Summary: Check databases using DBI +Group: System/Monitoring +Provides: nagios-plugins-dbi = %{version}-%{release} +Obsoletes: nagios-plugins-dbi < 1.5 +Requires: %{name}-dbi_backend == %{version} + +%description dbi +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This package provides the check_dbi plugin. + +%package dbi-mysql +Summary: Check MySQL/MariaDB database using DBI +Group: System/Monitoring +Provides: nagios-plugins-dbi-mysql = %{version}-%{release} +Obsoletes: nagios-plugins-dbi-mysql < 1.5 +Provides: %{name}-dbi_backend = %{version} +Requires: %{name}-dbi == %{version} +Requires: libdbi-drivers-dbd-mysql + +%description dbi-mysql +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with a MySQL/MariaDB database. + +%package dbi-pgsql +Summary: Check PostgreSQL database using DBI +Group: System/Monitoring +Provides: nagios-plugins-dbi-pgsql = %{version}-%{release} +Obsoletes: nagios-plugins-dbi-pgsql < 1.5 +Provides: %{name}-dbi_backend = %{version} +Requires: %{name}-dbi == %{version} +Requires: libdbi-drivers-dbd-pgsql + +%description dbi-pgsql +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with a PostgreSQL database + +%package dbi-sqlite3 +Summary: Check SQlite3 database using DBI +Group: System/Monitoring +Provides: nagios-plugins-dbi-sqlite3 = %{version}-%{release} +Obsoletes: nagios-plugins-dbi-sqlite3 < 1.5 +Provides: %{name}-dbi_backend = %{version} +Requires: %{name}-dbi == %{version} +Requires: libdbi-drivers-dbd-sqlite3 + +%description dbi-sqlite3 +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with a SQlite database. + +%package dhcp +Summary: Check DHCP servers +Group: System/Monitoring +Provides: nagios-plugins-dhcp = %{version}-%{release} +Obsoletes: nagios-plugins-dhcp < 1.5 +%if 0%{?suse_version} +Recommends: apparmor-parser +Recommends: apparmor-profiles +%else +Requires: apparmor-parser +Requires: apparmor-profiles +%endif + +%description dhcp +This plugin tests the availability of DHCP servers on a network. + +Please read +/usr/share/doc/packages/monitoring-plugins-dhcp/README.SUSE-check_dhcp +for details how to setup this check. + + +%package dig +Summary: Test DNS service via dig +Group: System/Monitoring +Provides: nagios-plugins-dig = %{version}-%{release} +Obsoletes: nagios-plugins-dig < 1.5 +Requires: %{_bindir}/dig + +%description dig +This plugin test the DNS service on the specified host using dig. + + +%package disk +Summary: Check disk space +Group: System/Monitoring +Provides: nagios-plugins-disk = %{version}-%{release} +Obsoletes: nagios-plugins-disk < 1.5 + +%description disk +This plugin checks the amount of used disk space on a mounted file system and +generates an alert if free space is less than one of the threshold values. + + +%package disk_smb +Summary: Check SMB Disk +Group: System/Monitoring +Requires: %{name}-common = %{version} +Provides: nagios-plugins-disk_smb = %{version}-%{release} +Obsoletes: nagios-plugins-disk_smb < 1.5 +Requires: perl + +%description disk_smb +Check the amount of used disk space on a remote Samba or Windows share and +generate an alert if free space is less than one of the threshold values. + + +%package dns +Summary: Obtain the IP address for a given host/domain +Group: System/Monitoring +Provides: nagios-plugins-dns = %{version}-%{release} +Obsoletes: nagios-plugins-dns < 1.5 +Requires: %{_bindir}/nslookup + +%description dns +This plugin uses the nslookup program to obtain the IP address for the given +host/domain query. + +An optional DNS server to use may be specified. If no DNS server is specified, +the default server(s) specified in /etc/resolv.conf will be used. + + +%package dummy +Summary: Dummy check +Group: System/Monitoring +Provides: nagios-plugins-dummy = %{version}-%{release} +Obsoletes: nagios-plugins-dummy < 1.5 + +%description dummy +This plugin will simply return the state corresponding to the numeric value of +the argument with optional text. + + +%package file_age +Summary: Check the age/size of files +Group: System/Monitoring +Provides: nagios-plugins-file_age = %{version}-%{release} +Obsoletes: nagios-plugins-file_age < 1.5 +Requires: %{name}-common = %{version} +Requires: perl + +%description file_age +This plugin will check either the age of files or their size. + + +%package flexlm +Summary: Check flexlm license managers +Group: System/Monitoring +Provides: nagios-plugins-flexlm = %{version}-%{release} +Obsoletes: nagios-plugins-flexlm < 1.5 +Requires: %{name}-common = %{version} +Requires: perl + +%description flexlm +Flexlm license managers usually run as a single server or three servers and a +quorum is needed. The plugin return OK if 1 (single) or 3 (triple) servers +are running, CRITICAL if 1(single) or 3 (triple) servers are down, and WARNING +if 1 or 2 of 3 servers are running. + + +%package fping +Summary: Fast ping check +Group: System/Monitoring +Provides: nagios-plugins-fping = %{version}-%{release} +Obsoletes: nagios-plugins-fping < 1.5 +Requires: fping + +%description fping +This plugin will use the fping command to ping the specified host for +a fast check. Note that it is necessary to set the suid flag on fping. + +%if 0%{?suse_version} < 01310 +%package game +Summary: Gameserver check +Group: System/Monitoring +Provides: nagios-plugins-game = %{version}-%{release} +Obsoletes: nagios-plugins-game < 1.5 +Requires: %{qstat_command} + +%description game +Check connections to game servers. This plugin uses the 'qstat' command, the +popular game server status query tool. +%endif + +%package hpjd +Summary: Check status of an HP printer +Group: System/Monitoring +Provides: nagios-plugins-hpjd = %{version}-%{release} +Obsoletes: nagios-plugins-hpjd < 1.5 +Requires: net-snmp + +%description hpjd +This plugin tests the STATUS of an HP printer with a JetDirect card. + + +%package http +Summary: Test the HTTP service on the specified host +Group: System/Monitoring +Provides: nagios-plugins-http = %{version}-%{release} +Obsoletes: nagios-plugins-http < 1.5 + +%description http +This plugin tests the HTTP service on the specified host. It can test +normal (http) and secure (https) servers, follow redirects, search for +strings and regular expressions, check connection times, and report on +certificate expiration times. + + +%package icmp +Summary: Send ICMP packets to the specified host +Group: System/Monitoring +Provides: nagios-plugins-icmp = %{version}-%{release} +Obsoletes: nagios-plugins-icmp < 1.5 + +%description icmp +This plugin sends ICMP (ping) packets to the specified host. You can +specify different RTA factors and acceptable packet loss. + +Please read +/usr/share/doc/packages/monitoring-plugins-icmp/README.SUSE-check_icmp +for details how to setup this check. + + +%package ide_smart +Summary: Check local hard drive +Group: System/Monitoring +Provides: nagios-plugins-ide_smart = %{version}-%{release} +Obsoletes: nagios-plugins-ide_smart < 1.5 + +%description ide_smart +This plugin checks a local hard drive with the (Linux specific) SMART +interface. + +Please read +/usr/share/doc/packages/monitoring-plugins-ide_smart/README.SUSE-check_ide_smart +for details how to setup this check. + + +%package ifoperstatus +Summary: Monitor network interfaces +Group: System/Monitoring +Provides: nagios-plugins-ifoperstatus = %{version}-%{release} +Obsoletes: nagios-plugins-ifoperstatus < 1.5 +Requires: %{name}-common = %{version} +Requires: perl-Net-SNMP + +%description ifoperstatus +This plugin monitors operational status of a particular network interface on +the target host. + + +%package ifstatus +Summary: Monitor operational status network interfaces +Group: System/Monitoring +Provides: nagios-plugins-ifstatus = %{version}-%{release} +Obsoletes: nagios-plugins-ifstatus < 1.5 +Requires: %{name}-common = %{version} +Requires: perl-Net-SNMP + +%description ifstatus +This plugin monitors operational status of each network interface on the target +host. + + +%package ircd +Summary: Check an IRCd server +Group: System/Monitoring +Provides: nagios-plugins-ircd = %{version}-%{release} +Obsoletes: nagios-plugins-ircd < 1.5 +Requires: %{name}-common = %{version} +Requires: perl +Requires: perl(IO::Socket::INET6) +Requires: perl(IO::Socket::SSL) + +%description ircd +Monitor the status of an Internet Relay Chat daemon (IRCd) with this check. + + +%package ldap +Summary: Test a LDAP server +Group: System/Monitoring +Provides: nagios-plugins-ldap = %{version}-%{release} +Obsoletes: nagios-plugins-ldap < 1.5 + +%description ldap +Monitor access to a Lightweight Directory Access Protocol (LDAP) server. + +This package includes the 'check_ldap' and 'check_ldaps' plugins. + + +%package load +Summary: Test the current system load average +Group: System/Monitoring +Provides: nagios-plugins-load = %{version}-%{release} +Obsoletes: nagios-plugins-load < 1.5 + +%description load +This plugin tests the current system load average. + + +%package log +Summary: Log file pattern detector +Group: System/Monitoring +Provides: nagios-plugins-log = %{version}-%{release} +Obsoletes: nagios-plugins-log < 1.5 +Requires: %{name}-common = %{version} + +%description log +This plugin provides a log file pattern detector - excluding old +logfile entries and searching for the given query. + + +%package mailq +Summary: Check mail queues +Group: System/Monitoring +Provides: nagios-plugins-mailq = %{version}-%{release} +Obsoletes: nagios-plugins-mailq < 1.5 +Requires: %{name}-common = %{version} +Requires: perl +%if 0%{?suse_version} +Requires: smtp_daemon +%endif + +%description mailq +This plugin checks the number of messages in the mail queue (supports multiple +sendmail queues, qmail). + + +%package mrtg +Summary: Check average or maximum value in an MRTG logfile +Group: System/Monitoring +Provides: nagios-plugins-mrtg = %{version}-%{release} +Obsoletes: nagios-plugins-mrtg < 1.5 +Recommends: mrtg + +%description mrtg +This plugin will check either the average or maximum value of one of the +two variables recorded in an MRTG log file. + + +%package mrtgtraf +Summary: Check incoming/outgoing transfer rates of a router +Group: System/Monitoring +Provides: nagios-plugins-mrtgtraf = %{version}-%{release} +Obsoletes: nagios-plugins-mrtgtraf < 1.5 +Recommends: mrtg + +%description mrtgtraf +This plugin will check the incoming/outgoing transfer rates of a router, +switch, etc recorded in an MRTG log. If the newest log entry is older +than , a WARNING status is returned. If either the +incoming or outgoing rates exceed the or thresholds (in +Bytes/sec), a CRITICAL status results. If either of the rates exceed +the or thresholds (in Bytes/sec), a WARNING status results. + + +%package mysql +Summary: Test a MySQL DBMS +Group: System/Monitoring +Provides: nagios-plugins-mysql = %{version}-%{release} +Obsoletes: nagios-plugins-mysql < 1.5 + +%description mysql +This plugin tests a MySQL DBMS to determine whether it is active and +accepting queries. It provides the two checks: 'check_mysql' and +'check_mysql_query'. + + +%package nagios +Summary: Check nagios server +Group: System/Monitoring +Provides: nagios-plugins-nagios = %{version}-%{release} +Obsoletes: nagios-plugins-nagios < 1.5 +Requires: monitoring_daemon + +%description nagios +This plugin checks the status of the Nagios process on the local machine. The +plugin will check to make sure the Nagios status log is no older than the +number of minutes specified by the expires option. + +It also checks the process table for a process matching the command argument. + + +%package nt +Summary: Collect data from NSClient service +Group: System/Monitoring +Provides: nagios-plugins-nt = %{version}-%{release} +Obsoletes: nagios-plugins-nt < 1.5 + +%description nt +This plugin collects data from the NSClient service running on a +Windows NT/2000/XP/2003 server. + + +%package ntp_peer +Summary: Check health of an NTP server +Group: System/Monitoring +Provides: nagios-plugins-ntp_peer = %{version}-%{release} +Obsoletes: nagios-plugins-ntp_peer < 1.5 + +%description ntp_peer +Use this plugin to check the health of an NTP server. It supports +checking the offset with the sync peer, the jitter and stratum. + +This plugin will not check the clock offset between the local host and NTP +server; please use check_ntp_time for that purpose. + + +%package ntp_time +Summary: Check clock offset with the ntp server +Group: System/Monitoring +Provides: nagios-plugins-ntp_time = %{version}-%{release} +Obsoletes: nagios-plugins-ntp_time < 1.5 +Provides: %{name}-ntp = %{version}-%{release} +%if 0%{?suse_version} +Recommends: apparmor-parser +Recommends: apparmor-profiles +%else +Requires: apparmor-parser +Requires: apparmor-profiles +%endif + +%description ntp_time +This plugin checks the clock offset between the local host and a remote NTP +server. It is independent of any commandline programs or external libraries. + + +%package nwstat +Summary: Check MRTGEXT NLM running +Group: System/Monitoring +Provides: nagios-plugins-nwstat = %{version}-%{release} +Obsoletes: nagios-plugins-nwstat < 1.5 + +%description nwstat +This plugin attempts to contact the MRTGEXT NLM running on a Novell server to +gather the requested system information. + + +%package oracle +Summary: Check Oracle status +Group: System/Monitoring +Provides: nagios-plugins-oracle = %{version}-%{release} +Obsoletes: nagios-plugins-oracle < 1.5 +Requires: %{name}-common = %{version} + +%description oracle +Check Oracle database health status. + + +%package overcr +Summary: Check Over-CR collector daemon +Group: System/Monitoring +Provides: nagios-plugins-overcr = %{version}-%{release} +Obsoletes: nagios-plugins-overcr < 1.5 + +%description overcr +This plugin attempts to contact the Over-CR collector daemon running on the +remote UNIX server in order to gather the requested system information. + + +%package pgsql +Summary: Test a PostgreSQL DBMS +Group: System/Monitoring +Provides: nagios-plugins-pgsql = %{version}-%{release} +Obsoletes: nagios-plugins-pgsql < 1.5 + +%description pgsql +This plugin tests a PostgreSQL DBMS to determine whether it is active and +accepting queries. It provides the check 'check_pgsql'. + + +%package ping +Summary: Check connection statistics +Group: System/Monitoring +Provides: nagios-plugins-ping = %{version}-%{release} +Obsoletes: nagios-plugins-ping < 1.5 +Requires: iputils + +%description ping +Use ping to check connection statistics for a remote host. + +This plugin uses the ping command to probe the specified host for packet loss +(percentage) and round trip average (milliseconds). + +%package procs +Summary: Check processes +Group: System/Monitoring +Provides: nagios-plugins-procs = %{version}-%{release} +Obsoletes: nagios-plugins-procs < 1.5 +Provides: monitoring-plugins-procs_perf = %{version}-%{release} +Obsoletes: monitoring-plugins-procs_perf < %{version} + +%description procs +This plugin checks the number of currently running processes and generates +WARNING or CRITICAL states if the process count is outside the specified +threshold ranges. + +The process count can be filtered by process owner, parent process PID, current +state (e.g., 'Z'), or may be the total number of running processes. + + +%if 0%{?suse_version} < 01110 || 0%{?suse_version} > 01300 +%package radius +Summary: Test RADIUS server +Group: System/Monitoring +Provides: nagios-plugins-radius = %{version}-%{release} +Obsoletes: nagios-plugins-radius < 1.5 +%if 0%{?suse_version} > 1020 +Requires: freeradius-client +%else +Requires: radiusclient +%endif + +%description radius +This plugin tests a RADIUS server to see if it is accepting connections. The +server to test must be specified in the invocation, as well as a user name and +password. A configuration file may also be present. The format of the +configuration file is described in the radiusclient library sources. The +password option presents a substantial security issue because the password can +possibly be determined by careful watching of the command line in a process +listing. This risk is exacerbated because nagios will run the plugin at regular +predictable intervals. Please be sure that the password used does not allow +access to sensitive system resources. +%endif + +%package real +Summary: Test REAL service +Group: System/Monitoring +Provides: nagios-plugins-real = %{version}-%{release} +Obsoletes: nagios-plugins-real < 1.5 + +%description real +This plugin will attempt to open an RTSP connection with the host. Successul +connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, other +errors return STATE_UNKNOWN. Successful connects, but incorrect reponse +messages from the host result in STATE_WARNING return values. + + +%package rpc +Summary: Check RPC service +Group: System/Monitoring +Provides: nagios-plugins-rpc = %{version}-%{release} +Obsoletes: nagios-plugins-rpc < 1.5 +Requires: %{name}-common = %{version} +Requires: perl +Requires: rpcbind + +%description rpc +Check if a rpc service is registered and running using rpcinfo. + + +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +%package sensors +Summary: Check hardware status using lm_sensors +Group: System/Monitoring +Provides: nagios-plugins-sensors = %{version}-%{release} +Obsoletes: nagios-plugins-sensors < 1.5 +Requires: %{name}-common = %{version} +Requires: grep +Requires: sensors + +%description sensors +This plugin checks hardware status using the lm_sensors package. +%endif + +%package smtp +Summary: Check SMTP connections +Group: System/Monitoring +Provides: nagios-plugins-smtp = %{version}-%{release} +Obsoletes: nagios-plugins-smtp < 1.5 + +%description smtp +This plugin will attempt to open an SMTP connection with the given host. + +%package snmp +Summary: SNMP monitoring +Group: System/Monitoring +Provides: nagios-plugins-snmp = %{version}-%{release} +Obsoletes: nagios-plugins-snmp < 1.5 +Requires: net-snmp + +%description snmp +The Simple Network Management Protocol (SNMP) can be used to monitor +network-attached devices for conditions that warrant administrative attention. + +This package includes the 'check_snmp' plugin for Nagios or Icinga. + + +%package ssh +Summary: Check SSH service +Group: System/Monitoring +Provides: nagios-plugins-ssh = %{version}-%{release} +Obsoletes: nagios-plugins-ssh < 1.5 + +%description ssh +Try to connect to an SSH server at specified server and port. + + +%package swap +Summary: Check swap space +Group: System/Monitoring +Provides: nagios-plugins-swap = %{version}-%{release} +Obsoletes: nagios-plugins-swap < 1.5 + +%description swap +Check swap space on local machine. + + +%package tcp +Summary: Tests TCP and UDP connections +Group: System/Monitoring +Provides: nagios-plugins-tcp = %{version}-%{release} +Obsoletes: nagios-plugins-tcp < 1.5 +Provides: %{name}-clamd = %{version}-%{release} +Provides: nagios-plugins-clamd = %{version}-%{release} +Obsoletes: nagios-plugins-clamd < 1.5 +Provides: %{name}-ftp = %{version}-%{release} +Provides: nagios-plugins-ftp = %{version}-%{release} +Obsoletes: nagios-plugins-ftp < 1.5 +Provides: %{name}-imap = %{version}-%{release} +Provides: nagios-plugins-imap = %{version}-%{release} +Obsoletes: nagios-plugins-imap < 1.5 +Provides: %{name}-jabber = %{version}-%{release} +Provides: nagios-plugins-jabber = %{version}-%{release} +Obsoletes: nagios-plugins-jabber < 1.5 +Provides: %{name}-nntp = %{version}-%{release} +Provides: nagios-plugins-nntp = %{version}-%{release} +Obsoletes: nagios-plugins-nntp < 1.5 +Provides: %{name}-nntps = %{version}-%{release} +Provides: nagios-plugins-nntps = %{version}-%{release} +Obsoletes: nagios-plugins-nntps < 1.5 +Provides: %{name}-pop = %{version}-%{release} +Provides: nagios-plugins-pop = %{version}-%{release} +Obsoletes: nagios-plugins-pop < 1.5 +Provides: %{name}-simap = %{version}-%{release} +Provides: nagios-plugins-simap = %{version}-%{release} +Obsoletes: nagios-plugins-simap < 1.5 +Provides: %{name}-spop = %{version}-%{release} +Provides: nagios-plugins-spop = %{version}-%{release} +Obsoletes: nagios-plugins-spop < 1.5 +Provides: %{name}-ssmtp = %{version}-%{release} +Provides: nagios-plugins-ssmtp = %{version}-%{release} +Obsoletes: nagios-plugins-ssmtp < 1.5 +Provides: %{name}-udp = %{version}-%{release} +Provides: nagios-plugins-udp = %{version}-%{release} +Obsoletes: nagios-plugins-udp < 1.5 + +%description tcp +This plugin tests TCP connections with the specified host (or unix socket). + +This package contains the following checks: +* check_clamd +* check_ftp +* check_imap +* check_jabber +* check_nntp +* check_nntps +* check_pop +* check_simap +* check_spop +* check_ssmtp +* check_tcp +* check_udp + + +%package time +Summary: Check the time on the specified host +Group: System/Monitoring +Provides: nagios-plugins-time = %{version}-%{release} +Obsoletes: nagios-plugins-time < 1.5 + +%description time +This plugin will check the time on the specified host. + + +%package ups +Summary: Test UPS service on the specified host +Group: System/Monitoring +Provides: nagios-plugins-ups = %{version}-%{release} +Obsoletes: nagios-plugins-ups < 1.5 + +%description ups +This plugin tests the UPS service on the specified host. + +Network UPS Tools from www.networkupstools.org must be running for this plugin +to work. + + +%package users +Summary: Check number of users currently logged in +Group: System/Monitoring +Provides: nagios-plugins-users = %{version}-%{release} +Obsoletes: nagios-plugins-users < 1.5 + +%description users +This plugin checks the number of users currently logged in on the local system +and generates an error if the number exceeds the thresholds specified. + +%package wave +Summary: Check wave signal strength +Group: System/Monitoring +Provides: nagios-plugins-wave = %{version}-%{release} +Obsoletes: nagios-plugins-wave < 1.5 +Requires: %{name}-common = %{version} +Requires: net-snmp +Requires: perl + +%description wave +Check the wave signal strength via SNMP. + + +%package cups +Summary: Check cups service +Group: System/Monitoring +Provides: nagios-plugins-cups = %{version}-%{release} +Obsoletes: nagios-plugins-cups < 1.5 +Requires: cups-client + +%description cups +Check the status of a remote CUPS server, all printers there +or one selected. It can also check queue there: +it will provide the size of the queue of age of queue. + +%prep +%setup -q -n %{name}-%{version} +%{__mkdir_p} example/permissions.d +%{__cp} %{S:11} example/permissions.d/%{name} +%{__cp} %{S:12} ./README.SUSE +%{__cp} %{S:13} ./README.SUSE-check_dhcp +%{__cp} %{S:14} ./README.SUSE-check_icmp +%{__cp} %{S:15} ./README.SUSE-check_ide_smart +%{__cp} %{S:20} ./README.SUSE-check_cups +for extension in mysql pgsql sqlite3 ; do +cat >> README.SUSE-dbi-$extension << EOF +This program connects to an (SQL) database using DBI and checks the +specified metric against threshold levels. The default metric is +the result of the specified query. + +This virtual package requires the needed libraries for check_dbi to work +with the libdbi driver for $extension. +EOF +done + +## %patch1 -p0 +## %patch2 -p0 +%patch6 +%patch11 +%patch12 +## %patch13 +%patch15 -p0 +# Debian patches +%patch116 -p1 +%patch117 -p1 +%patch118 -p1 +find -type f -exec %{__chmod} 644 {} \; + +%build +export CFLAGS="%optflags -fno-strict-aliasing -DLDAP_DEPRECATED" +chmod +x configure # needed as configure script is not executable in 1.5.. +%configure \ + --enable-static=no \ + --enable-extra-opts \ + --libexecdir=%{nagios_plugindir} \ + --sysconfdir=%{nagios_sysconfdir} \ + --with-apt-get-command=%{apt_get_command} \ + --with-cgiurl=/nagios/cgi-bin \ + --with-fping-command=%{_sbindir}/fping \ + --with-ipv6 \ + --with-ntpq-command=%{_sbindir}/ntpq \ + --with-ntpdc-command=%{_sbindir}/ntpdc \ + --with-ntpdate-command=%{_sbindir}/ntpdate \ + --with-openssl=%{_prefix} \ + --with-perl=%{_bindir}/perl \ + --with-pgsql=%{_prefix} \ + --with-ping6-command='/bin/ping6 -n -U -w %d -c %d %s' \ + --with-proc-loadavg=/proc/loadavg \ + --with-ps-command="/bin/ps axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" \ + --with-ps-format='%s %d %d %d %d %d %f %s %s %n' \ + --with-ps-cols=10 \ + --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos' \ + --with-rpcinfo-command=%{_sbindir}/rpcinfo \ + --with-qstat-command=%{qstat_command} \ + --with-mysql=%{_prefix} \ + --disable-rpath + #--enable-perl-modules +make all %{?jobs:-j%jobs} + +%install +sed -i 's,^MKINSTALLDIRS.*,MKINSTALLDIRS = ../mkinstalldirs,' po/Makefile +%makeinstall install-root +%{__install} -m 0755 %{S:18} $RPM_BUILD_ROOT%{nagios_plugindir}/check_cups +# provide check_host and check_rta_multi as on Debian +if [ -x %{buildroot}/%{nagios_plugindir}/check_icmp ] ; then + test -f %{buildroot}/%{nagios_plugindir}/check_host && rm -f %{buildroot}/%{nagios_plugindir}/check_host + test -f %{buildroot}/%{nagios_plugindir}/check_rta_multi && rm -f %{buildroot}/%{nagios_plugindir}/check_rta_multi + ln -s %{nagios_plugindir}/check_icmp %{buildroot}/%{nagios_plugindir}/check_host ; + ln -s %{nagios_plugindir}/check_icmp %{buildroot}/%{nagios_plugindir}/check_rta_multi ; +fi +# Factory maintainers do not want packages requiring software not in Factory: remove the checks +%if 0%{?suse_version} >= 01310 +rm %{buildroot}/%{nagios_plugindir}/check_apt +rm %{buildroot}/%{nagios_plugindir}/check_game +%endif + +# fix "use lib" on installed perl checks +pushd $RPM_BUILD_ROOT%{nagios_plugindir} +for file in $(find -maxdepth 1 -type f); do + sed -i 's|use lib "nagios/plugins".*;|use lib "%{nagios_plugindir}";|g; + s|use lib "/usr/local/nagios/libexec".*;|use lib "%{nagios_plugindir}";|g' $file +done +popd +# check_sensors makes no sense on some archs +%ifarch ppc ppc64 sparc sparc64 s390 s390x +%{__rm} -f %{buildroot}%{nagios_plugindir}/check_sensors +%endif +# provie procs_perf symlink for compatibility +ln -s %{nagios_plugindir}/check_procs %{buildroot}/%{nagios_plugindir}/check_procs_perf +# install Apparmor profiles +mkdir -p %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE16} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE17} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE19} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE22} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE23} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE24} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE25} %{buildroot}/%{_sysconfdir}/apparmor.d/ + +# install new ircd check +rm %{buildroot}/%{nagios_plugindir}/check_ircd +install -m 755 %{SOURCE26} %{buildroot}/%{nagios_plugindir}/check_ircd + +# inform the users about the deprecated monitoring-plugins-extras package +cat >> README.SUSE-deprecated << EOF +The monitoring-plugins-extras package is deprecated. + +The checks formerly packaged here are now packaged separately. + +For example, to install check_fping just install monitoring-plugins-fping. +EOF +cat >> README.SUSE-all << EOF +This virtual package recommends all currently available, official +Nagios plugins. + +It does not require the subpackages as you might not have all needed +dependend packages available. +EOF +# find locale files +%find_lang %{name} + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%post dhcp +# in case somebody uses the permissions file we provide +# in docdir, run permission here +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +%if 0%{?suse_version} < 1210 +%run_permissions +%else + %set_permissions monitoring-plugins +%endif +fi + +%post icmp +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +# in case somebody uses the permissions file we provide +# in docdir, run permission here +%if 0%{?suse_version} < 1210 +%run_permissions +%else +%set_permissions monitoring-plugins +%endif +fi + +%post ide_smart +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +# in case somebody uses the permissions file we provide +# in docdir, run permission here +%if 0%{?suse_version} < 1210 +%run_permissions +%else +%set_permissions monitoring-plugins +%endif +fi + +%files +%defattr(-,root,root) +%doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS ChangeLog CODING COPYING FAQ LEGAL +%doc NEWS README REQUIREMENTS SUPPORT THANKS README.SUSE +%doc example + +%files all +%defattr(-,root,root) +%doc README.SUSE-all + +%if 0%{?suse_version} < 01310 +%files apt +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_apt +%endif + +%files breeze +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_breeze + +%files by_ssh +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_by_ssh + +%files cluster +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_cluster + +%files common -f %{name}.lang +%defattr(-,root,root) +%doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS ChangeLog CODING COPYING FAQ LEGAL +%doc NEWS README REQUIREMENTS SUPPORT THANKS README.SUSE +%doc example +%dir %{nagios_libdir} +%dir %{nagios_plugindir} +%defattr(0755,root,root) +%{nagios_plugindir}/negate +%{nagios_plugindir}/urlize +%{nagios_plugindir}/utils.sh +%attr(0644,root,root) %{nagios_plugindir}/utils.pm + +%files dbi +%defattr(-,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dbi + +%files dbi-mysql +%defattr(-,root,root) +%doc README.SUSE-dbi-mysql + +%files dbi-pgsql +%defattr(-,root,root) +%doc README.SUSE-dbi-pgsql + +%files dbi-sqlite3 +%defattr(-,root,root) +%doc README.SUSE-dbi-sqlite3 + +%files dhcp +%defattr(-,root,root) +%doc README.SUSE-check_dhcp +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/apparmor.d +%attr(0755,root,root) %{nagios_plugindir}/check_dhcp +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_dhcp + +%files dig +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dig + +%files disk +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_disk + +%files disk_smb +%defattr(0755,root,root) +%{nagios_plugindir}/check_disk_smb + +%files dns +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dns + +%files dummy +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dummy + +%files extras +%defattr(0644,root,root,0755) +%doc README.SUSE-deprecated + +%files file_age +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_file_age + +%files flexlm +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_flexlm + +%files fping +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_fping + +%if 0%{?suse_version} < 01310 +%files game +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_game +%endif + +%files hpjd +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_hpjd + +%files http +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_http + +%files icmp +%defattr(-,root,root) +%doc README.SUSE-check_icmp +%dir %{nagios_plugindir} +%attr(0755,root,root) %{nagios_plugindir}/check_icmp +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_icmp +%attr(0755,root,root) %{nagios_plugindir}/check_host +%attr(0755,root,root) %{nagios_plugindir}/check_rta_multi + +%files ifoperstatus +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ifoperstatus + +%files ifstatus +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ifstatus + +%files ide_smart +%defattr(-,root,root) +%doc README.SUSE-check_ide_smart +%dir %{nagios_plugindir} +%attr(0755,root,root) %{nagios_plugindir}/check_ide_smart +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ide_smart + +%files ircd +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ircd + +%files ldap +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ldap +%{nagios_plugindir}/check_ldaps + +%files load +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_load + +%files log +%defattr(0755,root,root) +%{nagios_plugindir}/check_log + +%files mailq +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mailq + +%files mrtg +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mrtg + +%files mrtgtraf +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mrtgtraf + +%files mysql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mysql +%{nagios_plugindir}/check_mysql_query + +%files nagios +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nagios + +%files nt +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nt + +%files ntp_peer +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ntp_peer + +%files ntp_time +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ntp +%{nagios_plugindir}/check_ntp_time +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ntp_time + +%files nwstat +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nwstat + +%files oracle +%defattr(0755,root,root) +%{nagios_plugindir}/check_oracle + +%files overcr +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_overcr + +%files pgsql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_pgsql + +%files ping +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ping +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ping + +%files procs +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_procs +%{nagios_plugindir}/check_procs_perf + +%if 0%{?suse_version} < 01110 || 0%{?suse_version} > 01300 +%files radius +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_radius +%endif + +%files real +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_real + +%files rpc +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_rpc + +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +%files sensors +%defattr(0755,root,root) +%{nagios_plugindir}/check_sensors +%endif + +%files smtp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_smtp + +%files snmp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_snmp + +%files ssh +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ssh +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ssh + +%files swap +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_swap + +%files tcp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_clamd +%{nagios_plugindir}/check_ftp +%{nagios_plugindir}/check_imap +%{nagios_plugindir}/check_jabber +%{nagios_plugindir}/check_nntp +%{nagios_plugindir}/check_nntps +%{nagios_plugindir}/check_pop +%{nagios_plugindir}/check_simap +%{nagios_plugindir}/check_spop +%{nagios_plugindir}/check_ssmtp +%{nagios_plugindir}/check_tcp +%{nagios_plugindir}/check_udp + +%files time +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_time + +%files ups +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ups + +%files users +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_users + +%files wave +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_wave + +%files cups +%defattr(-,root,root) +%doc README.SUSE-check_cups +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/apparmor.d +%attr(0755,root,root)%{nagios_plugindir}/check_cups +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_cups + +%changelog diff --git a/monitoring-plugins.spec-20140715 b/monitoring-plugins.spec-20140715 new file mode 100644 index 0000000..afb30b7 --- /dev/null +++ b/monitoring-plugins.spec-20140715 @@ -0,0 +1,1393 @@ +# +# spec file for package monitoring-plugins +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# 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/ +# + + +Name: monitoring-plugins +Summary: The Monitoring Plug-Ins +License: GPL-2.0+ and GPL-3.0 +Group: System/Monitoring +Version: 1.5 +Release: 0 +Url: http://monitoring-plugins.org/ +PreReq: permissions +PreReq: update-alternatives +Source0: nagios-plugins-%{version}.tar.bz2 +%ifarch x86_64 +Source10: monitoring-plugins.check_xenvm.sh +%endif +Source11: monitoring-plugins-permissions +Source12: monitoring-plugins-README.SUSE +Source13: monitoring-plugins-README.SUSE-check_dhcp +Source14: monitoring-plugins-README.SUSE-check_icmp +Source15: monitoring-plugins-README.SUSE-check_ide_smart +Source16: usr.lib.monitoring.plugins.check_dhcp +Source17: usr.lib.monitoring.plugins.check_ntp_time +Source18: monitoring-plugins.check_cups.sh +Source19: usr.lib.monitoring.plugins.check_cups +Source20: monitoring-plugins-README.SUSE-check_cups +Source22: usr.lib.monitoring.plugins.check_ping +Source23: usr.lib.monitoring.plugins.check_icmp +Source24: usr.lib.monitoring.plugins.check_ide_smart +Source25: usr.lib.monitoring.plugins.check_ssh +Patch1: monitoring-plugins-1.4.14-ntpd.patch +Patch2: monitoring-plugins-1.4.14-check_log.patch +Patch6: monitoring-plugins-1.4.6-no_chown.patch +Patch11: monitoring-plugins.check_snmp.arrayaddress.patch +Patch12: monitoring-plugins-postgresql.patch +Patch13: monitoring-plugins.negate.validate_arguments.patch +Patch15: monitoring-plugins-too_few_arguments_for_check_disk.patch +Patch116: monitoring-plugins-wrong_return_in_check_swap.patch +Patch117: %{name}.check_snmp.snmpv3-context.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: bind-utils +BuildRequires: dhcp-devel +BuildRequires: fping +BuildRequires: update-alternatives +%if 0%{?suse_version} > 1210 +BuildRequires: libgnutls-devel +%else +BuildRequires: gnutls-devel +%endif +BuildRequires: iputils +BuildRequires: libsmbclient-devel +BuildRequires: mysql-devel +BuildRequires: nagios-devel +BuildRequires: nagios-rpm-macros +BuildRequires: net-snmp-devel +BuildRequires: openldap2-devel +BuildRequires: openssh +BuildRequires: openssl-devel +BuildRequires: perl-Net-SNMP +BuildRequires: postfix +BuildRequires: postgresql-devel +BuildRequires: procps +BuildRequires: python-devel +BuildRequires: samba-client +%if 0%{?suse_version} +%if 0%{?suse_version} > 1020 +BuildRequires: freeradius-client-devel +%else +BuildRequires: radiusclient +%endif +%if 0%{?suse_version} > 910 +BuildRequires: krb5-devel +BuildRequires: syslog-ng +%else +BuildRequires: heimdal-devel +%endif +%else +BuildRequires: krb5-devel +%endif +Provides: nagios-plugins = %{version} +Obsoletes: nagios-plugins < 1.5 +Conflicts: nagios-plugins > 1.5 +# recommend the old, included checks to allow an easy update - but +# also allow users to deselect some of the new sub-packages +Recommends: %{name}-bgpstate +Recommends: %{name}-breeze +Recommends: %{name}-by_ssh +Recommends: %{name}-cluster +Recommends: %{name}-dhcp +Recommends: %{name}-dig +Recommends: %{name}-disk +Recommends: %{name}-disk_smb +Recommends: %{name}-dns +Recommends: %{name}-dummy +Recommends: %{name}-file_age +Recommends: %{name}-flexlm +Recommends: %{name}-http +Recommends: %{name}-icmp +Recommends: %{name}-ide_smart +Recommends: %{name}-ifoperstatus +Recommends: %{name}-ifstatus +Recommends: %{name}-ircd +Recommends: %{name}-linux_raid +Recommends: %{name}-load +Recommends: %{name}-log +Recommends: %{name}-mailq +Recommends: %{name}-mrtg +Recommends: %{name}-mrtgtraf +Suggests: %{name}-nagios +Recommends: %{name}-nt +Recommends: %{name}-ntp_peer +Recommends: %{name}-ntp_time +Recommends: %{name}-nwstat +Recommends: %{name}-oracle +Recommends: %{name}-overcr +Recommends: %{name}-ping +Recommends: %{name}-procs +Recommends: %{name}-real +Recommends: %{name}-rpc +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +Recommends: %{name}-sensors +%endif +Recommends: %{name}-smtp +Recommends: %{name}-ssh +Recommends: %{name}-swap +Recommends: %{name}-tcp +Recommends: %{name}-time +Recommends: %{name}-ups +Recommends: %{name}-users +Recommends: %{name}-wave +%ifarch x86_64 +Suggests: %{name}-xenvm +%endif +Suggests: %{name}-cups +%define apt_get_command %{_bindir}/apt-get +%define qstat_command %{_bindir}/qstat + +%description +Nagios is a program that will monitor hosts and services on your +network, and to email or page you when a problem arises or is resolved. +Nagios runs on a unix server as a background or daemon process, +intermittently running checks on various services that you specify. + +The actual service checks are performed by separate "plugin" programs +which return the status of the checks to Nagios. + +This package contains those plugins. + +%package extras +Summary: Plug-Ins which depend on additional packages +Group: System/Monitoring +Provides: nagios-plugins-extras = 1.5 +Obsoletes: nagios-plugins-extras < 1.5 +Conflicts: nagios-plugins-extras > 1.5 +Suggests: %{name}-apt +Recommends: %{name}-fping +Suggests: %{name}-game +Requires: %{name}-common = %{version} +Recommends: %{name}-hpjd +Recommends: %{name}-ldap +Recommends: %{name}-mysql +Recommends: %{name}-pgsql +Recommends: %{name}-snmp + +%description extras +These are additional monitoring plug-ins for Nagios or Icinga. + +They depend on other packages which have to be installed. + +%package all +Summary: All Nagios-Plugin checks +Group: System/Monitoring +Provides: nagios-plugins-all = 1.5 +Obsoletes: nagios-plugins-all < 1.5 +Conflicts: nagios-plugins-all > 1.5 +Recommends: %{name}-apt +Recommends: %{name}-bgpstate +Recommends: %{name}-bind +Recommends: %{name}-bonding +Recommends: %{name}-breeze +Recommends: %{name}-by_ssh +Recommends: %{name}-clamav +Recommends: %{name}-cluster +Recommends: %{name}-contentage +Recommends: %{name}-cups +Recommends: %{name}-dhcp +Recommends: %{name}-dig +Recommends: %{name}-disk +Recommends: %{name}-diskio +Recommends: %{name}-disk_smb +Recommends: %{name}-dns +Recommends: %{name}-dummy +Recommends: %{name}-file_age +Recommends: %{name}-flexlm +Recommends: %{name}-fping +Recommends: %{name}-game +Recommends: %{name}-hpasm +Recommends: %{name}-hpjd +Recommends: %{name}-http +Recommends: %{name}-icmp +Recommends: %{name}-ide_smart +Recommends: %{name}-ifoperstatus +Recommends: %{name}-ifstatus +Recommends: %{name}-ipmi-sensor1 +Recommends: %{name}-ircd +Recommends: %{name}-ldap +Recommends: %{name}-linux_raid +Recommends: %{name}-load +Recommends: %{name}-log +Recommends: %{name}-maintenance +Recommends: %{name}-mem +Recommends: %{name}-mailq +Recommends: %{name}-mrtg +Recommends: %{name}-mrtgtraf +Recommends: %{name}-mysql +Recommends: %{name}-mysql_health +Recommends: %{name}-nagios +Recommends: %{name}-nfsmounts +Recommends: %{name}-nis +Recommends: %{name}-nt +Recommends: %{name}-ntp_peer +Recommends: %{name}-ntp_time +Recommends: %{name}-nwstat +Recommends: %{name}-oracle +Recommends: %{name}-overcr +Recommends: %{name}-pgsql +Recommends: %{name}-ping +Recommends: %{name}-procs +Recommends: %{name}-qlogic_sanbox +Recommends: %{name}-radius +Recommends: %{name}-real +Recommends: %{name}-rpc +Recommends: %{name}-rsync +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +Recommends: %{name}-sensors +%endif +Recommends: %{name}-smtp +Recommends: %{name}-snmp +Recommends: %{name}-ssh +Recommends: %{name}-swap +Recommends: %{name}-tcp +Recommends: %{name}-time +Recommends: %{name}-ups +Recommends: %{name}-ups_alarm +Recommends: %{name}-users +Recommends: %{name}-wave +Recommends: %{name}-xenvm +Recommends: %{name}-zypper + +%description all +This virtual package recommends all currently available, official +Nagios plugins. + + +%package apt +Summary: Check for software updates via apt-get +Group: System/Monitoring +Requires: %{apt_get_command} +Provides: nagios-plugins-apt = 1.5 +Obsoletes: nagios-plugins-apt < 1.5 +Conflicts: nagios-plugins-apt > 1.5 + +%description apt +This plugin checks for software updates on systems that use package management +systems based on the apt-get command found in Debian GNU/Linux + + +%package bgpstate +Summary: Monitor BGP sessions +Group: System/Monitoring +Requires: whois + +%description bgpstate +Perl bgpstate plugin monitors all BGP sessions. + + +%package breeze +Summary: Monitor Breezecom wireless equipment +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: net-snmp +Requires: perl + +%description breeze +This plugin reports the signal strength of a Breezecom wireless equipment. + + +%package by_ssh +Summary: Execute checks via SSH +Group: System/Monitoring +Requires: openssh + +%description by_ssh +This plugin uses SSH to execute commands on a remote host. + +The most common mode of use is to refer to a local identity file with +the '-i' option. In this mode, the identity pair should have a null +passphrase and the public key should be listed in the authorized_keys +file of the remote host. Usually the key will be restricted to running +only one command on the remote server. If the remote SSH server tracks +invocation arguments, the one remote program may be an agent that can +execute additional commands as proxy. + + +%package cluster +Summary: Host/Service Cluster Plugin +Group: System/Monitoring + +%description cluster +Provides the check_cluster plugin to check Services and/or Hosts running +as a cluster. + +Example: + check_cluster -s -d 2,0,2,0 -c @3: +Will alert critical if there are 3 or more service data points in a non-OK +state. + + +%package common +Summary: Libraries for Nagios plugins +Group: System/Monitoring +Provides: monitoring-plugins-libs = %{version}-%{release} +Obsoletes: monitoring-plugins-libs < %{version} + +%description common +This package includes the libraries (scripts) that are included by many +of the standard checks. + + +%package dhcp +Summary: Check DHCP servers +Group: System/Monitoring +%if 0%{?suse_version} +Recommends: apparmor-parser +%else +Requires: apparmor-parser +%endif + +%description dhcp +This plugin tests the availability of DHCP servers on a network. + +Please read +/usr/share/doc/packages/monitoring-plugins-dhcp/README.SUSE-check_dhcp +for details how to setup this check. + + +%package dig +Summary: Test DNS service via dig +Group: System/Monitoring +Requires: %{_bindir}/dig + +%description dig +This plugin test the DNS service on the specified host using dig. + + +%package disk +Summary: Check disk space +Group: System/Monitoring + +%description disk +This plugin checks the amount of used disk space on a mounted file system and +generates an alert if free space is less than one of the threshold values. + + +%package disk_smb +Summary: Check SMB Disk +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl + +%description disk_smb +Check the amount of used disk space on a remote Samba or Windows share and +generate an alert if free space is less than one of the threshold values. + + +%package dns +Summary: Obtain the IP address for a given host/domain +Group: System/Monitoring +Requires: %{_bindir}/nslookup + +%description dns +This plugin uses the nslookup program to obtain the IP address for the given +host/domain query. + +An optional DNS server to use may be specified. If no DNS server is specified, +the default server(s) specified in /etc/resolv.conf will be used. + + +%package dummy +Summary: Dummy check +Group: System/Monitoring + +%description dummy +This plugin will simply return the state corresponding to the numeric value of +the argument with optional text. + + +%package file_age +Summary: Check the age/size of files +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl + +%description file_age +This plugin will check either the age of files or their size. + + +%package flexlm +Summary: Check flexlm license managers +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl + +%description flexlm +Flexlm license managers usually run as a single server or three servers and a +quorum is needed. The plugin return OK if 1 (single) or 3 (triple) servers +are running, CRITICAL if 1(single) or 3 (triple) servers are down, and WARNING +if 1 or 2 of 3 servers are running. + + +%package fping +Summary: Fast ping check +Group: System/Monitoring +Requires: fping + +%description fping +This plugin will use the fping command to ping the specified host for +a fast check. Note that it is necessary to set the suid flag on fping. + + +%package game +Summary: Gameserver check +Group: System/Monitoring +Requires: %{qstat_command} + +%description game +Check connections to game servers. This plugin uses the 'qstat' command, the +popular game server status query tool. + + +%package hpjd +Summary: Check status of an HP printer +Group: System/Monitoring +Requires: net-snmp + +%description hpjd +This plugin tests the STATUS of an HP printer with a JetDirect card. + + +%package http +Summary: Test the HTTP service on the specified host +Group: System/Monitoring + +%description http +This plugin tests the HTTP service on the specified host. It can test +normal (http) and secure (https) servers, follow redirects, search for +strings and regular expressions, check connection times, and report on +certificate expiration times. + + +%package icmp +Summary: Send ICMP packets to the specified host +Group: System/Monitoring + +%description icmp +This plugin sends ICMP (ping) packets to the specified host. You can +specify different RTA factors and acceptable packet loss. + +Please read +/usr/share/doc/packages/monitoring-plugins-icmp/README.SUSE-check_icmp +for details how to setup this check. + + +%package ide_smart +Summary: Check local hard drive +Group: System/Monitoring + +%description ide_smart +This plugin checks a local hard drive with the (Linux specific) SMART +interface. + +Please read +/usr/share/doc/packages/monitoring-plugins-ide_smart/README.SUSE-check_ide_smart +for details how to setup this check. + + +%package ifoperstatus +Summary: Monitor network interfaces +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl-Net-SNMP + +%description ifoperstatus +This plugin monitors operational status of a particular network interface on +the target host. + + +%package ifstatus +Summary: Monitor operational status network interfaces +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl-Net-SNMP + +%description ifstatus +This plugin monitors operational status of each network interface on the target +host. + + +%package ircd +Summary: Check an IRCd server +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl + +%description ircd +Monitor the status of an Internet Relay Chat daemon (IRCd) with this check. + + +%package ldap +Summary: Test a LDAP server +Group: System/Monitoring + +%description ldap +Monitor access to a Lightweight Directory Access Protocol (LDAP) server. + +This package includes the 'check_ldap' and 'check_ldaps' plugins. + + +%package load +Summary: Test the current system load average +Group: System/Monitoring + +%description load +This plugin tests the current system load average. + + +%package log +Summary: Log file pattern detector +Group: System/Monitoring +Requires: %{name}-common = %{version} + +%description log +This plugin provides a log file pattern detector - excluding old +logfile entries and searching for the given query. + + +%package mailq +Summary: Check mail queues +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +%if 0%{?suse_version} +Requires: smtp_daemon +%endif + +%description mailq +This plugin checks the number of messages in the mail queue (supports multiple +sendmail queues, qmail). + + +%package mrtg +Summary: Check average or maximum value in an MRTG logfile +Group: System/Monitoring +Recommends: mrtg + +%description mrtg +This plugin will check either the average or maximum value of one of the +two variables recorded in an MRTG log file. + + +%package mrtgtraf +Summary: Check incoming/outgoing transfer rates of a router +Group: System/Monitoring +Recommends: mrtg + +%description mrtgtraf +This plugin will check the incoming/outgoing transfer rates of a router, +switch, etc recorded in an MRTG log. If the newest log entry is older +than , a WARNING status is returned. If either the +incoming or outgoing rates exceed the or thresholds (in +Bytes/sec), a CRITICAL status results. If either of the rates exceed +the or thresholds (in Bytes/sec), a WARNING status results. + + +%package mysql +Summary: Test a MySQL DBMS +Group: System/Monitoring + +%description mysql +This plugin tests a MySQL DBMS to determine whether it is active and +accepting queries. It provides the two checks: 'check_mysql' and +'check_mysql_query'. + + +%package nagios +Summary: Check nagios server +Group: System/Monitoring +Requires: monitoring_daemon + +%description nagios +This plugin checks the status of the Nagios process on the local machine. The +plugin will check to make sure the Nagios status log is no older than the +number of minutes specified by the expires option. + +It also checks the process table for a process matching the command argument. + + +%package nt +Summary: Collect data from NSClient service +Group: System/Monitoring + +%description nt +This plugin collects data from the NSClient service running on a +Windows NT/2000/XP/2003 server. + + +%package ntp_peer +Summary: Check health of an NTP server +Group: System/Monitoring + +%description ntp_peer +Use this plugin to check the health of an NTP server. It supports +checking the offset with the sync peer, the jitter and stratum. + +This plugin will not check the clock offset between the local host and NTP +server; please use check_ntp_time for that purpose. + + +%package ntp_time +Summary: Check clock offset with the ntp server +Group: System/Monitoring +Provides: %{name}-ntp = %{version}-%{release} +%if 0%{?suse_version} +Recommends: apparmor-parser +%else +Requires: apparmor-parser +%endif + +%description ntp_time +This plugin checks the clock offset between the local host and a remote NTP +server. It is independent of any commandline programs or external libraries. + + +%package nwstat +Summary: Check MRTGEXT NLM running +Group: System/Monitoring + +%description nwstat +This plugin attempts to contact the MRTGEXT NLM running on a Novell server to +gather the requested system information. + + +%package oracle +Summary: Check Oracle status +Group: System/Monitoring +Requires: %{name}-common = %{version} + +%description oracle +Check Oracle database health status. + + +%package overcr +Summary: Check Over-CR collector daemon +Group: System/Monitoring + +%description overcr +This plugin attempts to contact the Over-CR collector daemon running on the +remote UNIX server in order to gather the requested system information. + + +%package pgsql +Summary: Test a PostgreSQL DBMS +Group: System/Monitoring + +%description pgsql +This plugin tests a PostgreSQL DBMS to determine whether it is active and +accepting queries. It provides the check 'check_pgsql'. + + +%package ping +Summary: Check connection statistics +Group: System/Monitoring +Requires: iputils + +%description ping +Use ping to check connection statistics for a remote host. + +This plugin uses the ping command to probe the specified host for packet loss +(percentage) and round trip average (milliseconds). + +%package procs +Summary: Check processes +Group: System/Monitoring + +%description procs +This plugin checks the number of currently running processes and generates +WARNING or CRITICAL states if the process count is outside the specified +threshold ranges. + +The process count can be filtered by process owner, parent process PID, current +state (e.g., 'Z'), or may be the total number of running processes. + + +%package procs_perf +Summary: Extended version of check_procs plugin for Nagios +Group: System/Monitoring +Url: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_procs_perf/details + +%description procs_perf +Extended version of check_procs plugin with metric dependant performance data, +extended status information and total warning/critical thresholds + +Total warning and total critical thresholds ranges (options -x, -y) applied to +summary metric across all processes that matched filter +- Extended status information for failed processes: + pid, metric and value (not applicable for PROC metric) +- Added Glabal status (max of total and per-process) as well as total status and + usual per-process status +- Performance data dependant on metric requested: PROC, VSZ, RSS, CPU + -v is required to output performance data + +%if 0%{?suse_version} < 01110 +%package radius +Summary: Test RADIUS server +Group: System/Monitoring +%if 0%{?suse_version} > 1020 +Requires: freeradius-client +%else +Requires: radiusclient +%endif + +%description radius +This plugin tests a RADIUS server to see if it is accepting connections. The +server to test must be specified in the invocation, as well as a user name and +password. A configuration file may also be present. The format of the +configuration file is described in the radiusclient library sources. The +password option presents a substantial security issue because the password can +possibly be determined by careful watching of the command line in a process +listing. This risk is exacerbated because nagios will run the plugin at regular +predictable intervals. Please be sure that the password used does not allow +access to sensitive system resources. +%endif + +%package real +Summary: Test REAL service +Group: System/Monitoring + +%description real +This plugin will attempt to open an RTSP connection with the host. Successul +connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, other +errors return STATE_UNKNOWN. Successful connects, but incorrect reponse +messages from the host result in STATE_WARNING return values. + + +%package rpc +Summary: Check RPC service +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: perl +Requires: rpcbind + +%description rpc +Check if a rpc service is registered and running using rpcinfo. + + +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +%package sensors +Summary: Check hardware status using lm_sensors +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: grep +Requires: sensors + +%description sensors +This plugin checks hardware status using the lm_sensors package. +%endif + +%package smtp +Summary: Check SMTP connections +Group: System/Monitoring + +%description smtp +This plugin will attempt to open an SMTP connection with the given host. + +%package snmp +Summary: SNMP monitoring +Group: System/Monitoring +Requires: net-snmp + +%description snmp +The Simple Network Management Protocol (SNMP) can be used to monitor +network-attached devices for conditions that warrant administrative attention. + +This package includes the 'check_snmp' plugin for Nagios or Icinga. + + +%package ssh +Summary: Check SSH service +Group: System/Monitoring + +%description ssh +Try to connect to an SSH server at specified server and port. + + +%package swap +Summary: Check swap space +Group: System/Monitoring + +%description swap +Check swap space on local machine. + + +%package tcp +Summary: Tests TCP and UDP connections +Group: System/Monitoring +Provides: %{name}-clamd = %{version}-%{release} +Provides: %{name}-ftp = %{version}-%{release} +Provides: %{name}-imap = %{version}-%{release} +Provides: %{name}-jabber = %{version}-%{release} +Provides: %{name}-nntp = %{version}-%{release} +Provides: %{name}-nntps = %{version}-%{release} +Provides: %{name}-pop = %{version}-%{release} +Provides: %{name}-simap = %{version}-%{release} +Provides: %{name}-spop = %{version}-%{release} +Provides: %{name}-ssmtp = %{version}-%{release} +Provides: %{name}-udp = %{version}-%{release} + +%description tcp +This plugin tests TCP connections with the specified host (or unix socket). + +This package contains the following checks: +* check_clamd +* check_ftp +* check_imap +* check_jabber +* check_nntp +* check_nntps +* check_pop +* check_simap +* check_spop +* check_ssmtp +* check_tcp +* check_udp + + +%package time +Summary: Check the time on the specified host +Group: System/Monitoring + +%description time +This plugin will check the time on the specified host. + + +%package ups +Summary: Test UPS service on the specified host +Group: System/Monitoring + +%description ups +This plugin tests the UPS service on the specified host. + +Network UPS Tools from www.networkupstools.org must be running for this plugin +to work. + + +%package users +Summary: Check number of users currently logged in +Group: System/Monitoring + +%description users +This plugin checks the number of users currently logged in on the local system +and generates an error if the number exceeds the thresholds specified. + +%package wave +Summary: Check wave signal strength +Group: System/Monitoring +Requires: %{name}-common = %{version} +Requires: net-snmp +Requires: perl + +%description wave +Check the wave signal strength via SNMP. + + +%ifarch x86_64 +%package xenvm +Summary: Check available XEN VMs +Group: System/Monitoring +Requires: xen-tools + +%description xenvm +Checks the number of Xen VMs running on a machine and returns a warning +or a critical message if the number exceeds the thresholds specified. +%endif + +%package cups +Summary: Check cups service +Group: System/Monitoring +Requires: cups-client + +%description cups +Check the status of a remote CUPS server, all printers there +or one selected. It can also check queue there: +it will provide the size of the queue of age of queue. + +%prep +%setup -q -n nagios-plugins-%{version} +%{__mkdir_p} example/permissions.d +%{__cp} %{S:11} example/permissions.d/%{name} +%{__cp} %{S:12} ./README.SUSE +%{__cp} %{S:13} ./README.SUSE-check_dhcp +%{__cp} %{S:14} ./README.SUSE-check_icmp +%{__cp} %{S:15} ./README.SUSE-check_ide_smart +%{__cp} %{S:20} ./README.SUSE-check_cups +%patch1 -p0 +%patch2 -p0 +%patch6 +%patch11 +%patch12 +%patch13 +%patch15 -p0 +# Debian patches +%patch116 -p1 +%patch117 -p1 +find -type f -exec %{__chmod} 644 {} \; + +%build +export CFLAGS="%optflags -fno-strict-aliasing -DLDAP_DEPRECATED" +chmod +x configure # needed as configure script is not executable in 1.5.. +%configure \ + --enable-static=no \ + --enable-extra-opts \ + --libexecdir=%{nagios_plugindir} \ + --sysconfdir=%{nagios_sysconfdir} \ + --with-apt-get-command=%{apt_get_command} \ + --with-cgiurl=/nagios/cgi-bin \ + --with-fping-command=%{_sbindir}/fping \ + --with-ipv6 \ + --with-ntpq-command=%{_sbindir}/ntpq \ + --with-ntpdc-command=%{_sbindir}/ntpdc \ + --with-ntpdate-command=%{_sbindir}/ntpdate \ + --with-openssl=%{_prefix} \ + --with-perl=%{_bindir}/perl \ + --with-pgsql=%{_prefix} \ + --with-ping6-command='/bin/ping6 -n -U -w %d -c %d %s' \ + --with-proc-loadavg=/proc/loadavg \ + --with-ps-command="/bin/ps axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" \ + --with-ps-format='%s %d %d %d %d %d %f %s %s %n' \ + --with-ps-cols=10 \ + --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos' \ + --with-rpcinfo-command=%{_sbindir}/rpcinfo \ + --with-qstat-command=%{qstat_command} \ + --with-mysql=%{_prefix} \ + --disable-rpath + #--enable-perl-modules +make all %{?jobs:-j%jobs} + +%install +sed -i 's,^MKINSTALLDIRS.*,MKINSTALLDIRS = ../mkinstalldirs,' po/Makefile +%makeinstall install-root +%ifarch x86_64 +%{__install} -m 0755 %{S:10} $RPM_BUILD_ROOT%{nagios_plugindir}/check_xenvm +%endif +%{__install} -m 0755 %{S:18} $RPM_BUILD_ROOT%{nagios_plugindir}/check_cups +# provide check_host and check_rta_multi as on Debian +if [ -x %{buildroot}/%{nagios-plugindir}/check_icmp ] ; then + test -f %{buildroot}/%{nagios-plugindir}/check_host && rm -f %{buildroot}/%{nagios-plugindir}/check_host + test -f %{buildroot}/%{nagios-plugindir}/check_rta_multi && rm -f %{buildroot}/%{nagios-plugindir}/check_rta_multi + ln -s %{nagios-plugindir}/check_icmp %{buildroot}/%{nagios-plugindir}/check_host ; + ln -s %{nagios-plugindir}/check_icmp %{buildroot}/%{nagios-plugindir}/check_rta_multi ; +fi + +# fix "use lib" on installed perl checks +pushd $RPM_BUILD_ROOT%{nagios_plugindir} +for file in $(find -maxdepth 1 -type f); do + sed -i 's|use lib "nagios/plugins".*;|use lib "%{nagios_plugindir}";|g; + s|use lib "/usr/local/nagios/libexec".*;|use lib "%{nagios_plugindir}";|g' $file +done +popd +# check_sensors makes no sense on some archs +%ifarch ppc ppc64 sparc sparc64 s390 s390x +%{__rm} -f %{buildroot}%{nagios_plugindir}/check_sensors +%endif +# install Apparmor profiles +mkdir -p %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE16} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE17} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE19} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE22} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE23} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE24} %{buildroot}/%{_sysconfdir}/apparmor.d/ +install -m 644 %{SOURCE25} %{buildroot}/%{_sysconfdir}/apparmor.d/ + +# inform the users about the deprecated monitoring-plugins-extras package +cat >> README.SUSE-deprecated << EOF +The monitoring-plugins-extras package is deprecated. + +The checks formerly packaged here are now packaged separately. + +For example, to install check_fping just install monitoring-plugins-fping. +EOF +cat >> README.SUSE-all << EOF +This virtual package recommends all currently available, official +Nagios plugins. + +It does not require the subpackages as you might not have all needed +dependend packages available. +EOF +# find locale files +##%find_lang %{name} +%find_lang nagios-plugins + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%post +%{_sbindir}/update-alternatives --install "%{nagios_plugindir}" "%{name}" "%{nagios_plugindir}/../%{name}" 10 + +%preun +if [ "$1" = 0 ] ; then + %{_sbindir}/update-alternatives --remove "%{name}" "%{nagios_plugindir}/../%{name}" +fi + +%post dhcp +# in case somebody uses the permissions file we provide +# in docdir, run permission here +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +%if 0%{?suse_version} < 1210 +%run_permissions +%else + %set_permissions monitoring-plugins +%endif +fi + +%post icmp +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +# in case somebody uses the permissions file we provide +# in docdir, run permission here +%if 0%{?suse_version} < 1210 +%run_permissions +%else +%set_permissions monitoring-plugins +%endif +fi + +%post ide_smart +if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then +# in case somebody uses the permissions file we provide +# in docdir, run permission here +%if 0%{?suse_version} < 1210 +%run_permissions +%else +%set_permissions monitoring-plugins +%endif +fi + +%files +%defattr(-,root,root) +%doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS ChangeLog CODING COPYING FAQ LEGAL +%doc NEWS README REQUIREMENTS SUPPORT THANKS README.SUSE +%doc example + +%files all +%defattr(-,root,root) +%doc README.SUSE-all + +%files apt +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_apt + +%files breeze +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_breeze + +%files by_ssh +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_by_ssh + +%files cluster +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_cluster + +##files common -f %{name}.lang +%files common -f nagios-plugins.lang +%defattr(-,root,root) +%doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS ChangeLog CODING COPYING FAQ LEGAL +%doc NEWS README REQUIREMENTS SUPPORT THANKS README.SUSE +%doc example +%dir %{nagios_libdir} +%dir %{nagios_plugindir} +%defattr(0755,root,root) +%{nagios_plugindir}/negate +%{nagios_plugindir}/urlize +%{nagios_plugindir}/utils.sh +%attr(0644,root,root) %{nagios_plugindir}/utils.pm + +%files dhcp +%defattr(-,root,root) +%doc README.SUSE-check_dhcp +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/apparmor.d +%attr(0755,root,root) %{nagios_plugindir}/check_dhcp +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_dhcp + +%files dig +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dig + +%files disk +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_disk + +%files disk_smb +%defattr(0755,root,root) +%{nagios_plugindir}/check_disk_smb + +%files dns +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dns + +%files dummy +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_dummy + +%files extras +%defattr(0644,root,root,0755) +%doc README.SUSE-deprecated + +%files file_age +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_file_age + +%files flexlm +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_flexlm + +%files fping +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_fping + +%files game +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_game + +%files hpjd +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_hpjd + +%files http +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_http + +%files icmp +%defattr(-,root,root) +%doc README.SUSE-check_icmp +%dir %{nagios_plugindir} +%attr(0755,root,root) %{nagios_plugindir}/check_icmp +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_icmp + +%files ifoperstatus +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ifoperstatus + +%files ifstatus +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ifstatus + +%files ide_smart +%defattr(-,root,root) +%doc README.SUSE-check_ide_smart +%dir %{nagios_plugindir} +%attr(0755,root,root) %{nagios_plugindir}/check_ide_smart +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_ide_smart + +%files ircd +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ircd + +%files ldap +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ldap +%{nagios_plugindir}/check_ldaps + +%files load +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_load + +%files log +%defattr(0755,root,root) +%{nagios_plugindir}/check_log + +%files mailq +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mailq + +%files mrtg +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mrtg + +%files mrtgtraf +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mrtgtraf + +%files mysql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_mysql +%{nagios_plugindir}/check_mysql_query + +%files nagios +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nagios + +%files nt +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nt + +%files ntp_peer +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ntp_peer + +%files ntp_time +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ntp +%{nagios_plugindir}/check_ntp_time +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_ntp_time + +%files nwstat +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_nwstat + +%files oracle +%defattr(0755,root,root) +%{nagios_plugindir}/check_oracle + +%files overcr +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_overcr + +%files pgsql +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_pgsql + +%files ping +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ping +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_ping + +%files procs +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_procs + +%if 0%{?suse_version} < 01110 +%files radius +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_radius +%endif + +%files real +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_real + +%files rpc +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_rpc + +%ifnarch ppc ppc64 sparc sparc64 s390 s390x +%files sensors +%defattr(0755,root,root) +%{nagios_plugindir}/check_sensors +%endif + +%files smtp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_smtp + +%files snmp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_snmp + +%files ssh +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ssh +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_ssh + +%files swap +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_swap + +%files tcp +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_clamd +%{nagios_plugindir}/check_ftp +%{nagios_plugindir}/check_imap +%{nagios_plugindir}/check_jabber +%{nagios_plugindir}/check_nntp +%{nagios_plugindir}/check_nntps +%{nagios_plugindir}/check_pop +%{nagios_plugindir}/check_simap +%{nagios_plugindir}/check_spop +%{nagios_plugindir}/check_ssmtp +%{nagios_plugindir}/check_tcp +%{nagios_plugindir}/check_udp + +%files time +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_time + +%files ups +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_ups + +%files users +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_users + +%files wave +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_wave + +%ifarch x86_64 +%files xenvm +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_xenvm +%endif + +%files cups +%defattr(-,root,root) +%doc README.SUSE-check_cups +%dir %{nagios_plugindir} +%dir %{_sysconfdir}/apparmor.d +%attr(0755,root,root)%{nagios_plugindir}/check_cups +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.monitoring.plugins.check_cups + +%changelog diff --git a/usr.lib.nagios.plugins.check_cups b/usr.lib.nagios.plugins.check_cups new file mode 100644 index 0000000..8e736bd --- /dev/null +++ b/usr.lib.nagios.plugins.check_cups @@ -0,0 +1,31 @@ +# Last Modified: Mon Mar 11 14:58:16 2013 +#include + +/usr/lib/nagios/plugins/check_cups { + #include + #include + #include + #include + + network inet dgram, + network inet stream, + + /bin/bash rix, + /bin/grep rix, + /{usr/,}bin/which rix, + /{usr/,}bin/lpstat rix, + /{usr/,}bin/basename rix, + /{usr/,}bin/mktemp rix, + /{usr/,}bin/date rix, + /{usr/,}bin/rm rix, + /{usr/,}bin/cut rix, + /{usr/,}bin/bc rix, + /{usr/,}bin/wc rix, + /tmp/lpstat* wr, + + /var/run/nscd/services r, + + /etc/cups/client.conf r, + /proc/sys/crypto/fips_enabled r, + +} diff --git a/usr.lib.nagios.plugins.check_dhcp b/usr.lib.nagios.plugins.check_dhcp new file mode 100644 index 0000000..a31f5b8 --- /dev/null +++ b/usr.lib.nagios.plugins.check_dhcp @@ -0,0 +1,6 @@ +#include +/usr/lib/nagios/plugins/check_dhcp { + #include + #include + capability net_raw, +} diff --git a/usr.lib.nagios.plugins.check_icmp b/usr.lib.nagios.plugins.check_icmp new file mode 100644 index 0000000..01ecfaf --- /dev/null +++ b/usr.lib.nagios.plugins.check_icmp @@ -0,0 +1,9 @@ +#include +/usr/lib/nagios/plugins/check_icmp { + #include + #include + + capability net_raw, + capability setuid, + network inet raw, +} diff --git a/usr.lib.nagios.plugins.check_ide_smart b/usr.lib.nagios.plugins.check_ide_smart new file mode 100644 index 0000000..31b4726 --- /dev/null +++ b/usr.lib.nagios.plugins.check_ide_smart @@ -0,0 +1,10 @@ +# Last Modified: Wed May 16 10:38:11 2012 +#include + +/usr/lib/nagios/plugins/check_ide_smart { + #include + capability sys_admin, + capability sys_rawio, + /dev/s* r, + /dev/h* r, +} diff --git a/usr.lib.nagios.plugins.check_ntp_time b/usr.lib.nagios.plugins.check_ntp_time new file mode 100644 index 0000000..5b91bdc --- /dev/null +++ b/usr.lib.nagios.plugins.check_ntp_time @@ -0,0 +1,22 @@ +#include + +/usr/lib/nagios/plugins/check_ntp_time { + #include + #include + #include + #include + + 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, +} diff --git a/usr.lib.nagios.plugins.check_ping b/usr.lib.nagios.plugins.check_ping new file mode 100644 index 0000000..4f3646d --- /dev/null +++ b/usr.lib.nagios.plugins.check_ping @@ -0,0 +1,12 @@ +#include +/usr/lib/nagios/plugins/check_ping { + #include + #include + + capability net_raw, + capability setuid, + network inet raw, + network inet6 raw, + /{usr/,}bin/ping rix, + /{usr/,}bin/ping6 rix, +} diff --git a/usr.lib.nagios.plugins.check_ssh b/usr.lib.nagios.plugins.check_ssh new file mode 100644 index 0000000..e61da98 --- /dev/null +++ b/usr.lib.nagios.plugins.check_ssh @@ -0,0 +1,5 @@ +#include +/usr/lib/nagios/plugins/check_ssh flags=(complain) { + #include + #include +}