From f8d9ee89c9bf6fc99b066a0d66cd7e1d382ea6060e38245e07a2fb15ea061a11 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sat, 27 Dec 2014 16:40:34 +0000 Subject: [PATCH] - update to 2.1.1: FIXES + Fix check_ntp's jitter checking + Fix check_ntp's handling of invalid server responses + Fix check_apt's handling of invalid regular expressions + Fix check_real's server response processing + Fix backslash escaping in check_tcp's --help output + Fix check_jabber to work with Openfire servers + Fix check_oracle bad string matching when testing TNS server + Fixed check_ifstatus performance data output + Fixed expire time output for sslutils + check_dns now verifies if the answer is returning from the queried server + Fix check_by_ssh to accept --hostname as argument ENHANCEMENTS + New check_hpjd -p option for port specification (abrist) + New ./configure --with-qmail-qstat-command option to specify the path to qmail-qstat(8) + New check_ifstatus -n option to ignore interfaces by name + check_ntp_peer has now specific state output for each metric + New check_mysql -n option to ignore authentication failures + Added IP and port or socket name to error messages + New check_ntp_time -o option to add expected offset + check_disk shows now troubled partions in verbose mode + check_dig has now support for drill and dig + check_dig has now support for -6 option + Add performance data to check_file_age - removed upstreamed patches: + monitoring-plugins-1.4.14-ntpd.patch + monitoring-plugins.check_ntp.c-64bit-portability-issue.patch OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=12 --- monitoring-plugins-1.4.14-check_log.patch | 85 ---- monitoring-plugins-1.4.14-ntpd.patch | 12 - monitoring-plugins-2.0.tar.bz2 | 3 - monitoring-plugins-2.1.1-check_logfile.patch | 90 ++++ monitoring-plugins-2.1.1.tar.bz2 | 3 + ...ins-too_few_arguments_for_check_disk.patch | 2 +- ...g-plugins-wrong_return_in_check_swap.patch | 6 +- monitoring-plugins.changes | 40 ++ ...check_hpjd.c-64bit-portability-issue.patch | 13 + ....check_ntp.c-64bit-portability-issue.patch | 13 - ...ng-plugins.check_snmp.snmpv3-context.patch | 6 +- ...ng-plugins.negate.validate_arguments.patch | 26 -- monitoring-plugins.spec | 432 ++++++++---------- 13 files changed, 352 insertions(+), 379 deletions(-) delete mode 100644 monitoring-plugins-1.4.14-check_log.patch delete mode 100644 monitoring-plugins-1.4.14-ntpd.patch delete mode 100644 monitoring-plugins-2.0.tar.bz2 create mode 100644 monitoring-plugins-2.1.1-check_logfile.patch create mode 100644 monitoring-plugins-2.1.1.tar.bz2 create mode 100644 monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch delete mode 100644 monitoring-plugins.check_ntp.c-64bit-portability-issue.patch delete mode 100644 monitoring-plugins.negate.validate_arguments.patch diff --git a/monitoring-plugins-1.4.14-check_log.patch b/monitoring-plugins-1.4.14-check_log.patch deleted file mode 100644 index 166e91c..0000000 --- a/monitoring-plugins-1.4.14-check_log.patch +++ /dev/null @@ -1,85 +0,0 @@ -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 deleted file mode 100644 index 9550cb2..0000000 --- a/monitoring-plugins-1.4.14-ntpd.patch +++ /dev/null @@ -1,12 +0,0 @@ -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-2.0.tar.bz2 b/monitoring-plugins-2.0.tar.bz2 deleted file mode 100644 index c1daa2b..0000000 --- a/monitoring-plugins-2.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da55221547d56d680810c57ca943a83806aa38902c9afd3e44cda8d780fbff98 -size 2209391 diff --git a/monitoring-plugins-2.1.1-check_logfile.patch b/monitoring-plugins-2.1.1-check_logfile.patch new file mode 100644 index 0000000..cf5559d --- /dev/null +++ b/monitoring-plugins-2.1.1-check_logfile.patch @@ -0,0 +1,90 @@ +Index: monitoring-plugins-2.1.1/plugins-scripts/check_log.sh +=================================================================== +--- monitoring-plugins-2.1.1.orig/plugins-scripts/check_log.sh ++++ monitoring-plugins-2.1.1/plugins-scripts/check_log.sh +@@ -115,27 +115,27 @@ while test -n "$1"; do + exit $STATE_OK + ;; + --filename) +- logfile=$2 ++ logfile="$2" + shift + ;; + -F) +- logfile=$2 ++ logfile="$2" + shift + ;; + --oldlog) +- oldlog=$2 ++ oldlog="$2" + shift + ;; + -O) +- oldlog=$2 ++ oldlog="$2" + shift + ;; + --query) +- query=$2 ++ query="$2" + shift + ;; + -q) +- query=$2 ++ query="$2" + shift + ;; + -x) +@@ -157,10 +157,10 @@ done + + # 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!" + exit $STATE_UNKNOWN +-elif [ ! -r $logfile ] ; then ++elif [ ! -r "$logfile" ] ; then + echo "Log check error: Log file $logfile is not readable!" + exit $STATE_UNKNOWN + fi +@@ -169,8 +169,8 @@ fi + # 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..." + exit $STATE_OK + fi +@@ -184,20 +184,20 @@ if [ -x /bin/mktemp ]; then + 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" diff --git a/monitoring-plugins-2.1.1.tar.bz2 b/monitoring-plugins-2.1.1.tar.bz2 new file mode 100644 index 0000000..f1f050f --- /dev/null +++ b/monitoring-plugins-2.1.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5118d0a231c8d0870c17c8420354053106fc03b91dfc37ab535a943451a6c45e +size 2209756 diff --git a/monitoring-plugins-too_few_arguments_for_check_disk.patch b/monitoring-plugins-too_few_arguments_for_check_disk.patch index 75fc8f8..2a29c0e 100644 --- a/monitoring-plugins-too_few_arguments_for_check_disk.patch +++ b/monitoring-plugins-too_few_arguments_for_check_disk.patch @@ -2,7 +2,7 @@ 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 +@@ -1002,7 +1002,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, diff --git a/monitoring-plugins-wrong_return_in_check_swap.patch b/monitoring-plugins-wrong_return_in_check_swap.patch index 79a88f3..03c5537 100644 --- a/monitoring-plugins-wrong_return_in_check_swap.patch +++ b/monitoring-plugins-wrong_return_in_check_swap.patch @@ -29,10 +29,10 @@ 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 +Index: monitoring-plugins-2.1.1/plugins/check_swap.c =================================================================== ---- monitoring-plugins-2.0.orig/plugins/check_swap.c -+++ monitoring-plugins-2.0/plugins/check_swap.c +--- monitoring-plugins-2.1.1.orig/plugins/check_swap.c ++++ monitoring-plugins-2.1.1/plugins/check_swap.c @@ -125,7 +125,7 @@ main (int argc, char **argv) free_swap_mb += dskfree_mb; if (allswaps) { diff --git a/monitoring-plugins.changes b/monitoring-plugins.changes index ffc788b..e868c20 100644 --- a/monitoring-plugins.changes +++ b/monitoring-plugins.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Sat Dec 27 12:41:01 UTC 2014 - lars@linux-schulserver.de + +- update to 2.1.1: + FIXES + + Fix check_ntp's jitter checking + + Fix check_ntp's handling of invalid server responses + + Fix check_apt's handling of invalid regular expressions + + Fix check_real's server response processing + + Fix backslash escaping in check_tcp's --help output + + Fix check_jabber to work with Openfire servers + + Fix check_oracle bad string matching when testing TNS server + + Fixed check_ifstatus performance data output + + Fixed expire time output for sslutils + + check_dns now verifies if the answer is returning from the queried + server + + Fix check_by_ssh to accept --hostname as argument + ENHANCEMENTS + + New check_hpjd -p option for port specification (abrist) + + New ./configure --with-qmail-qstat-command option to specify the path to + qmail-qstat(8) + + New check_ifstatus -n option to ignore interfaces by name + + check_ntp_peer has now specific state output for each metric + + New check_mysql -n option to ignore authentication failures + + Added IP and port or socket name to error messages + + New check_ntp_time -o option to add expected offset + + check_disk shows now troubled partions in verbose mode + + check_dig has now support for drill and dig + + check_dig has now support for -6 option + + Add performance data to check_file_age +- removed upstreamed patches: + + monitoring-plugins-1.4.14-ntpd.patch + + monitoring-plugins.check_ntp.c-64bit-portability-issue.patch +- adapted monitoring-plugins-1.4.14-check_log.patch to new version: + + monitoring-plugins-2.1.1-check_logfile.patch +- added the following new patch: + + monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch +- refreshed the other patches +- ran spec-cleaner + ------------------------------------------------------------------- Sun Aug 10 17:11:48 UTC 2014 - lars@linux-schulserver.de diff --git a/monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch b/monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch new file mode 100644 index 0000000..c54478f --- /dev/null +++ b/monitoring-plugins.check_hpjd.c-64bit-portability-issue.patch @@ -0,0 +1,13 @@ +Index: monitoring-plugins-2.1.1/plugins/check_hpjd.c +=================================================================== +--- monitoring-plugins-2.1.1.orig/plugins/check_hpjd.c ++++ monitoring-plugins-2.1.1/plugins/check_hpjd.c +@@ -66,7 +66,7 @@ void print_usage (void); + + char *community = NULL; + char *address = NULL; +-char *port = NULL; ++int port = NULL; + + int + main (int argc, char **argv) diff --git a/monitoring-plugins.check_ntp.c-64bit-portability-issue.patch b/monitoring-plugins.check_ntp.c-64bit-portability-issue.patch deleted file mode 100644 index 413ca2c..0000000 --- a/monitoring-plugins.check_ntp.c-64bit-portability-issue.patch +++ /dev/null @@ -1,13 +0,0 @@ -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.snmpv3-context.patch b/monitoring-plugins.check_snmp.snmpv3-context.patch index 7bbdbab..c8136cc 100644 --- a/monitoring-plugins.check_snmp.snmpv3-context.patch +++ b/monitoring-plugins.check_snmp.snmpv3-context.patch @@ -1,7 +1,7 @@ -Index: monitoring-plugins-2.0/plugins/check_snmp.c +Index: monitoring-plugins-2.1.1/plugins/check_snmp.c =================================================================== ---- monitoring-plugins-2.0.orig/plugins/check_snmp.c -+++ monitoring-plugins-2.0/plugins/check_snmp.c +--- monitoring-plugins-2.1.1.orig/plugins/check_snmp.c ++++ monitoring-plugins-2.1.1/plugins/check_snmp.c @@ -104,6 +104,8 @@ int errcode, excode; char *server_address = NULL; diff --git a/monitoring-plugins.negate.validate_arguments.patch b/monitoring-plugins.negate.validate_arguments.patch deleted file mode 100644 index 63af04c..0000000 --- a/monitoring-plugins.negate.validate_arguments.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- - 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 index 4de708a..7dd709a 100644 --- a/monitoring-plugins.spec +++ b/monitoring-plugins.spec @@ -17,13 +17,12 @@ Name: monitoring-plugins +Version: 2.1.1 +Release: 0 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 @@ -44,20 +43,27 @@ Source26: check_ircd_ssl Source27: %{name}-README-extra-opts Source28: %{name}-README.SUSE-check_ping Source29: %{name}-README.SUSE-check_ntp_time -Patch1: %{name}-1.4.14-ntpd.patch -Patch2: %{name}-1.4.14-check_log.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches +Patch1: %{name}-2.1.1-check_logfile.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches Patch6: %{name}-1.4.6-no_chown.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches Patch11: %{name}.check_snmp.arrayaddress.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches Patch12: %{name}-postgresql.patch -Patch13: %{name}.negate.validate_arguments.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches Patch15: %{name}-too_few_arguments_for_check_disk.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches Patch116: %{name}-wrong_return_in_check_swap.patch +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches Patch117: %{name}.check_snmp.snmpv3-context.patch -Patch118: %{name}.check_ntp.c-64bit-portability-issue.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches +Patch118: %{name}.check_hpjd.c-64bit-portability-issue.patch BuildRequires: bind-utils BuildRequires: dhcp-devel BuildRequires: fping +PreReq: permissions +BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1210 BuildRequires: libgnutls-devel %else @@ -77,6 +83,7 @@ BuildRequires: postfix BuildRequires: postgresql-devel BuildRequires: procps BuildRequires: python-devel +BuildRequires: rpcbind BuildRequires: samba-client %if 0%{?suse_version} %if 0%{?suse_version} > 1020 @@ -93,7 +100,7 @@ BuildRequires: heimdal-devel %else BuildRequires: krb5-devel %endif -# recommend the old, included checks to allow an easy update - but +# 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 @@ -119,7 +126,6 @@ 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 @@ -130,6 +136,7 @@ Recommends: %{name}-ping Recommends: %{name}-procs Recommends: %{name}-real Recommends: %{name}-rpc +Suggests: %{name}-nagios %ifnarch ppc ppc64 sparc sparc64 s390 s390x Recommends: %{name}-sensors %endif @@ -146,9 +153,9 @@ Suggests: %{name}-cups %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 +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. @@ -156,17 +163,17 @@ 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}-fping Recommends: %{name}-hpjd Recommends: %{name}-ldap Recommends: %{name}-mysql Recommends: %{name}-pgsql Recommends: %{name}-snmp +Suggests: %{name}-apt +Suggests: %{name}-game +Provides: nagios-plugins-extras = %{version} +Obsoletes: nagios-plugins-extras <= 1.5 %description extras These are additional monitoring checks that require additional packages @@ -175,8 +182,6 @@ 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 @@ -193,8 +198,8 @@ Recommends: %{name}-dbi-sqlite3 Recommends: %{name}-dhcp Recommends: %{name}-dig Recommends: %{name}-disk -Recommends: %{name}-diskio Recommends: %{name}-disk_smb +Recommends: %{name}-diskio Recommends: %{name}-dns Recommends: %{name}-dummy Recommends: %{name}-file_age @@ -214,9 +219,9 @@ Recommends: %{name}-ldap Recommends: %{name}-linux_raid Recommends: %{name}-load Recommends: %{name}-log +Recommends: %{name}-mailq Recommends: %{name}-maintenance Recommends: %{name}-mem -Recommends: %{name}-mailq Recommends: %{name}-mrtg Recommends: %{name}-mrtgtraf Recommends: %{name}-mysql @@ -238,6 +243,8 @@ Recommends: %{name}-radius Recommends: %{name}-real Recommends: %{name}-rpc Recommends: %{name}-rsync +Provides: nagios-plugins-all = %{version} +Obsoletes: nagios-plugins-all <= 1.5 %ifnarch ppc ppc64 sparc sparc64 s390 s390x Recommends: %{name}-sensors %endif @@ -251,21 +258,20 @@ Recommends: %{name}-ups Recommends: %{name}-ups_alarm Recommends: %{name}-users Recommends: %{name}-wave -Recommends: nagios-xen-host Recommends: %{name}-zypper +Recommends: nagios-xen-host %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 - +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} +Provides: nagios-plugins-apt = %{version} Obsoletes: nagios-plugins-apt <= 1.5 %description apt @@ -277,22 +283,21 @@ example. %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 +Provides: nagios-plugins-breeze = %{version} +Obsoletes: nagios-plugins-breeze <= 1.5 %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 +Provides: nagios-plugins-by_ssh = %{version} +Obsoletes: nagios-plugins-by_ssh <= 1.5 %description by_ssh This plugin uses SSH to execute commands on a remote host. @@ -305,15 +310,14 @@ 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} +Provides: nagios-plugins-cluster = %{version} Obsoletes: nagios-plugins-cluster <= 1.5 %description cluster -Provides the check_cluster plugin to check Services and/or Hosts running +Provides the check_cluster plugin to check Services and/or Hosts running as a cluster. Example: @@ -321,11 +325,10 @@ Example: 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} +Provides: nagios-plugins-common = %{version} Obsoletes: nagios-plugins-common <= 1.5 %description common @@ -335,9 +338,10 @@ of the standard checks. %package dbi Summary: Check databases using DBI Group: System/Monitoring -Provides: nagios-plugins-dbi = %{version}-%{release} +Requires: %{name}-dbi_backend >= %{version} +Requires: %{version} +Provides: nagios-plugins-dbi = %{version} 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 @@ -349,11 +353,12 @@ 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} +Requires: %{name}-dbi >= %{version} +Requires: %{version} +Requires: libdbi-drivers-dbd-mysql +Provides: nagios-plugins-dbi-mysql = %{version} 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 @@ -366,11 +371,12 @@ with a MySQL/MariaDB database. %package dbi-pgsql Summary: Check PostgreSQL database using DBI Group: System/Monitoring -Provides: nagios-plugins-dbi-pgsql = %{version}-%{release} +Requires: %{name}-dbi >= %{version} +Requires: %{version} +Requires: libdbi-drivers-dbd-pgsql +Provides: nagios-plugins-dbi-pgsql = %{version} 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 @@ -383,11 +389,12 @@ with a PostgreSQL database %package dbi-sqlite3 Summary: Check SQlite3 database using DBI Group: System/Monitoring -Provides: nagios-plugins-dbi-sqlite3 = %{version}-%{release} +Requires: %{name}-dbi >= %{version} +Requires: %{version} +Requires: libdbi-drivers-dbd-sqlite3 +Provides: nagios-plugins-dbi-sqlite3 = %{version} 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 @@ -400,7 +407,7 @@ with a SQlite database. %package dhcp Summary: Check DHCP servers Group: System/Monitoring -Provides: nagios-plugins-dhcp = %{version}-%{release} +Provides: nagios-plugins-dhcp = %{version} Obsoletes: nagios-plugins-dhcp <= 1.5 %if 0%{?suse_version} Recommends: apparmor-parser @@ -413,91 +420,84 @@ Requires: apparmor-profiles %description dhcp This plugin tests the availability of DHCP servers on a network. -Please read +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 +Provides: nagios-plugins-dig = %{version} +Obsoletes: nagios-plugins-dig <= 1.5 %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} +Provides: nagios-plugins-disk = %{version} 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 +Provides: nagios-plugins-disk_smb = %{version} +Obsoletes: nagios-plugins-disk_smb <= 1.5 %description disk_smb -Check the amount of used disk space on a remote Samba or Windows share and +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 +Provides: nagios-plugins-dns = %{version} +Obsoletes: nagios-plugins-dns <= 1.5 %description dns This plugin uses the nslookup program to obtain the IP address for the given -host/domain query. +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} +Provides: nagios-plugins-dummy = %{version} 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 +Provides: nagios-plugins-file_age = %{version} +Obsoletes: nagios-plugins-file_age <= 1.5 %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 +Provides: nagios-plugins-flexlm = %{version} +Obsoletes: nagios-plugins-flexlm <= 1.5 %description flexlm Flexlm license managers usually run as a single server or three servers and a @@ -505,13 +505,12 @@ 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 +Provides: nagios-plugins-fping = %{version} +Obsoletes: nagios-plugins-fping <= 1.5 %description fping This plugin will use the fping command to ping the specified host for @@ -521,9 +520,9 @@ a fast check. Note that it is necessary to set the suid flag on fping. %package game Summary: Gameserver check Group: System/Monitoring -Provides: nagios-plugins-game = %{version}-%{release} -Obsoletes: nagios-plugins-game <= 1.5 Requires: %{qstat_command} +Provides: nagios-plugins-game = %{version} +Obsoletes: nagios-plugins-game <= 1.5 %description game Check connections to game servers. This plugin uses the 'qstat' command, the @@ -533,18 +532,17 @@ popular game server status query tool. %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 +Provides: nagios-plugins-hpjd = %{version} +Obsoletes: nagios-plugins-hpjd <= 1.5 %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} +Provides: nagios-plugins-http = %{version} Obsoletes: nagios-plugins-http <= 1.5 %description http @@ -553,81 +551,75 @@ 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} +Provides: nagios-plugins-icmp = %{version} Obsoletes: nagios-plugins-icmp <= 1.5 %description icmp -This plugin sends ICMP (ping) packets to the specified host. You can +This plugin sends ICMP (ping) packets to the specified host. You can specify different RTA factors and acceptable packet loss. -Please read +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} +Provides: nagios-plugins-ide_smart = %{version} 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 +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 +Provides: nagios-plugins-ifoperstatus = %{version} +Obsoletes: nagios-plugins-ifoperstatus <= 1.5 %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 +Provides: nagios-plugins-ifstatus = %{version} +Obsoletes: nagios-plugins-ifstatus <= 1.5 %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) +Provides: nagios-plugins-ircd = %{version} +Obsoletes: nagios-plugins-ircd <= 1.5 %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} +Provides: nagios-plugins-ldap = %{version} Obsoletes: nagios-plugins-ldap <= 1.5 %description ldap @@ -635,36 +627,33 @@ 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} +Provides: nagios-plugins-load = %{version} 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} +Provides: nagios-plugins-log = %{version} +Obsoletes: nagios-plugins-log <= 1.5 %description log -This plugin provides a log file pattern detector - excluding old +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 +Provides: nagios-plugins-mailq = %{version} +Obsoletes: nagios-plugins-mailq <= 1.5 %if 0%{?suse_version} Requires: smtp_daemon %endif @@ -673,25 +662,23 @@ Requires: smtp_daemon 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 +Provides: nagios-plugins-mrtg = %{version} +Obsoletes: nagios-plugins-mrtg <= 1.5 %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 +Provides: nagios-plugins-mrtgtraf = %{version} +Obsoletes: nagios-plugins-mrtgtraf <= 1.5 %description mrtgtraf This plugin will check the incoming/outgoing transfer rates of a router, @@ -701,25 +688,23 @@ 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} +Provides: nagios-plugins-mysql = %{version} 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 +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 +Provides: nagios-plugins-nagios = %{version} +Obsoletes: nagios-plugins-nagios <= 1.5 %description nagios This plugin checks the status of the Nagios process on the local machine. The @@ -728,38 +713,35 @@ 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} +Provides: nagios-plugins-nt = %{version} 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} +Provides: nagios-plugins-ntp_peer = %{version} 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. +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} +Provides: nagios-plugins-ntp_time = %{version} Obsoletes: nagios-plugins-ntp_time <= 1.5 -Provides: %{name}-ntp = %{version}-%{release} +Provides: %{name}-ntp = %{version} %if 0%{?suse_version} Recommends: apparmor-parser Recommends: apparmor-profiles @@ -772,57 +754,52 @@ Requires: apparmor-profiles 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} +Provides: nagios-plugins-nwstat = %{version} 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} +Provides: nagios-plugins-oracle = %{version} +Obsoletes: nagios-plugins-oracle <= 1.5 %description oracle Check Oracle database health status. - %package overcr Summary: Check Over-CR collector daemon Group: System/Monitoring -Provides: nagios-plugins-overcr = %{version}-%{release} +Provides: nagios-plugins-overcr = %{version} 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} +Provides: nagios-plugins-pgsql = %{version} 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 +Provides: nagios-plugins-ping = %{version} +Obsoletes: nagios-plugins-ping <= 1.5 %description ping Use ping to check connection statistics for a remote host. @@ -833,24 +810,23 @@ This plugin uses the ping command to probe the specified host for packet loss %package procs Summary: Check processes Group: System/Monitoring -Provides: nagios-plugins-procs = %{version}-%{release} +Provides: nagios-plugins-procs = %{version} Obsoletes: nagios-plugins-procs <= 1.5 -Provides: monitoring-plugins-procs_perf = %{version}-%{release} +Provides: monitoring-plugins-procs_perf = %{version} 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. +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 radius Summary: Test RADIUS server Group: System/Monitoring -Provides: nagios-plugins-radius = %{version}-%{release} +Provides: nagios-plugins-radius = %{version} Obsoletes: nagios-plugins-radius <= 1.5 %description radius @@ -867,7 +843,7 @@ access to sensitive system resources. %package real Summary: Test REAL service Group: System/Monitoring -Provides: nagios-plugins-real = %{version}-%{release} +Provides: nagios-plugins-real = %{version} Obsoletes: nagios-plugins-real <= 1.5 %description real @@ -876,29 +852,27 @@ 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 +Provides: nagios-plugins-rpc = %{version} +Obsoletes: nagios-plugins-rpc <= 1.5 %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 +Provides: nagios-plugins-sensors = %{version} +Obsoletes: nagios-plugins-sensors <= 1.5 %description sensors This plugin checks hardware status using the lm_sensors package. @@ -907,7 +881,7 @@ This plugin checks hardware status using the lm_sensors package. %package smtp Summary: Check SMTP connections Group: System/Monitoring -Provides: nagios-plugins-smtp = %{version}-%{release} +Provides: nagios-plugins-smtp = %{version} Obsoletes: nagios-plugins-smtp <= 1.5 %description smtp @@ -916,9 +890,9 @@ 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 +Provides: nagios-plugins-snmp = %{version} +Obsoletes: nagios-plugins-snmp <= 1.5 %description snmp The Simple Network Management Protocol (SNMP) can be used to monitor @@ -926,64 +900,61 @@ 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} +Provides: nagios-plugins-ssh = %{version} 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} +Provides: nagios-plugins-swap = %{version} 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} +Provides: nagios-plugins-tcp = %{version} Obsoletes: nagios-plugins-tcp <= 1.5 -Provides: %{name}-clamd = %{version}-%{release} -Provides: nagios-plugins-clamd = %{version}-%{release} +Provides: %{name}-clamd = %{version} +Provides: nagios-plugins-clamd = %{version} Obsoletes: nagios-plugins-clamd <= 1.5 -Provides: %{name}-ftp = %{version}-%{release} -Provides: nagios-plugins-ftp = %{version}-%{release} +Provides: %{name}-ftp = %{version} +Provides: nagios-plugins-ftp = %{version} Obsoletes: nagios-plugins-ftp <= 1.5 -Provides: %{name}-imap = %{version}-%{release} -Provides: nagios-plugins-imap = %{version}-%{release} +Provides: %{name}-imap = %{version} +Provides: nagios-plugins-imap = %{version} Obsoletes: nagios-plugins-imap <= 1.5 -Provides: %{name}-jabber = %{version}-%{release} -Provides: nagios-plugins-jabber = %{version}-%{release} +Provides: %{name}-jabber = %{version} +Provides: nagios-plugins-jabber = %{version} Obsoletes: nagios-plugins-jabber <= 1.5 -Provides: %{name}-nntp = %{version}-%{release} -Provides: nagios-plugins-nntp = %{version}-%{release} +Provides: %{name}-nntp = %{version} +Provides: nagios-plugins-nntp = %{version} Obsoletes: nagios-plugins-nntp <= 1.5 -Provides: %{name}-nntps = %{version}-%{release} -Provides: nagios-plugins-nntps = %{version}-%{release} +Provides: %{name}-nntps = %{version} +Provides: nagios-plugins-nntps = %{version} Obsoletes: nagios-plugins-nntps <= 1.5 -Provides: %{name}-pop = %{version}-%{release} -Provides: nagios-plugins-pop = %{version}-%{release} +Provides: %{name}-pop = %{version} +Provides: nagios-plugins-pop = %{version} Obsoletes: nagios-plugins-pop <= 1.5 -Provides: %{name}-simap = %{version}-%{release} -Provides: nagios-plugins-simap = %{version}-%{release} +Provides: %{name}-simap = %{version} +Provides: nagios-plugins-simap = %{version} Obsoletes: nagios-plugins-simap <= 1.5 -Provides: %{name}-spop = %{version}-%{release} -Provides: nagios-plugins-spop = %{version}-%{release} +Provides: %{name}-spop = %{version} +Provides: nagios-plugins-spop = %{version} Obsoletes: nagios-plugins-spop <= 1.5 -Provides: %{name}-ssmtp = %{version}-%{release} -Provides: nagios-plugins-ssmtp = %{version}-%{release} +Provides: %{name}-ssmtp = %{version} +Provides: nagios-plugins-ssmtp = %{version} Obsoletes: nagios-plugins-ssmtp <= 1.5 -Provides: %{name}-udp = %{version}-%{release} -Provides: nagios-plugins-udp = %{version}-%{release} +Provides: %{name}-udp = %{version} +Provides: nagios-plugins-udp = %{version} Obsoletes: nagios-plugins-udp <= 1.5 %description tcp @@ -1003,34 +974,31 @@ This package contains the following checks: * check_tcp * check_udp - %package time Summary: Check the time on the specified host Group: System/Monitoring -Provides: nagios-plugins-time = %{version}-%{release} +Provides: nagios-plugins-time = %{version} 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} +Provides: nagios-plugins-ups = %{version} Obsoletes: nagios-plugins-ups <= 1.5 %description ups -This plugin tests the UPS service on the specified host. +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} +Provides: nagios-plugins-users = %{version} Obsoletes: nagios-plugins-users <= 1.5 %description users @@ -1038,32 +1006,31 @@ 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 +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 +Provides: nagios-plugins-wave = %{version} +Obsoletes: nagios-plugins-wave <= 1.5 %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 +Provides: nagios-plugins-cups = %{version} +Obsoletes: nagios-plugins-cups <= 1.5 %description cups -Check the status of a remote CUPS server, all printers there +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} +%setup -q %{__mkdir_p} example/permissions.d %{__cp} %{S:11} example/permissions.d/%{name} %{__cp} %{S:12} ./README.SUSE @@ -1085,12 +1052,10 @@ with the libdbi driver for $extension. EOF done -## %patch1 -p0 -## %patch2 -p0 +%patch1 -p1 %patch6 %patch11 %patch12 -## %patch13 %patch15 -p0 # Debian patches %patch116 -p1 @@ -1099,7 +1064,7 @@ done find -type f -exec %{__chmod} 644 {} \; %build -export CFLAGS="%optflags -fno-strict-aliasing -DLDAP_DEPRECATED" +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 \ @@ -1109,6 +1074,7 @@ chmod +x configure # needed as configure script is not executable in 1.5.. --with-apt-get-command=%{apt_get_command} \ --with-cgiurl=/nagios/cgi-bin \ --with-fping-command=%{_sbindir}/fping \ + --with-fping6-command=%{_sbindir}/fping6 \ --with-ipv6 \ --with-ntpq-command=%{_sbindir}/ntpq \ --with-ntpdc-command=%{_sbindir}/ntpdc \ @@ -1126,27 +1092,27 @@ chmod +x configure # needed as configure script is not executable in 1.5.. --with-qstat-command=%{qstat_command} \ --with-mysql=%{_prefix} \ --disable-rpath -make all %{?jobs:-j%jobs} +make all %{?_smp_mflags} %install sed -i 's,^MKINSTALLDIRS.*,MKINSTALLDIRS = ../mkinstalldirs,' po/Makefile %makeinstall install-root -%{__install} -m 0755 %{S:18} $RPM_BUILD_ROOT%{nagios_plugindir}/check_cups +%{__install} -m 0755 %{S:18} %{buildroot}%{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 ; +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 +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} +pushd %{buildroot}%{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 @@ -1157,48 +1123,48 @@ popd %{__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 +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/ +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 +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. +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 +This virtual package recommends all currently available, official Nagios plugins. -It does not require the subpackages as you might not have all needed +It does not require the subpackages as you might not have all needed dependend packages available. EOF # install ghost file for extra-opts -install -Dm 644 %{SOURCE27} %{buildroot}/%{_sysconfdir}/%{name}/README -touch %{buildroot}/%{_sysconfdir}/%{name}/%{name}.ini +install -Dm 644 %{SOURCE27} %{buildroot}%{_sysconfdir}/%{name}/README +touch %{buildroot}%{_sysconfdir}/%{name}/%{name}.ini # find locale files %find_lang %{name} %clean -%{__rm} -rf $RPM_BUILD_ROOT +%{__rm} -rf %{buildroot} %post dhcp -# in case somebody uses the permissions file we provide +# 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 @@ -1210,7 +1176,7 @@ fi %post icmp if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then -# in case somebody uses the permissions file we provide +# in case somebody uses the permissions file we provide # in docdir, run permission here %if 0%{?suse_version} < 1210 %run_permissions @@ -1221,7 +1187,7 @@ fi %post ide_smart if [ -f %{_sysconfdir}/permissions.d/monitoring-plugins ]; then -# in case somebody uses the permissions file we provide +# in case somebody uses the permissions file we provide # in docdir, run permission here %if 0%{?suse_version} < 1210 %run_permissions @@ -1270,7 +1236,7 @@ fi %dir %{nagios_libdir} %dir %{nagios_plugindir} %dir %{_sysconfdir}/%{name} -%{_sysconfdir}/%{name}/README +%config %{_sysconfdir}/%{name}/README %ghost %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini %defattr(0755,root,root) %{nagios_plugindir}/negate