![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package nagios-plugins for openSUSE:Factory checked in at 2011-12-21 10:01:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nagios-plugins (Old) and /work/SRC/openSUSE:Factory/.nagios-plugins.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nagios-plugins", Maintainer is "lrupp@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/nagios-plugins/nagios-plugins.changes 2011-09-23 02:14:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nagios-plugins.new/nagios-plugins.changes 2011-12-21 10:01:45.000000000 +0100 @@ -1,0 +2,28 @@ +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 + +------------------------------------------------------------------- New: ---- 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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nagios-plugins.spec ++++++ --- /var/tmp/diff_new_pack.0sNvgb/_old 2011-12-21 10:01:47.000000000 +0100 +++ /var/tmp/diff_new_pack.0sNvgb/_new 2011-12-21 10:01:47.000000000 +0100 @@ -17,7 +17,6 @@ # norootforbuild -%define libexecdir %_prefix/lib/nagios/plugins Name: nagios-plugins Summary: The Nagios Plug-Ins @@ -43,6 +42,12 @@ Patch11: nagios-plugins.check_snmp.arrayaddress.patch Patch12: nagios-plugins-postgresql.patch Patch13: nagios-plugins.negate.validate_arguments.patch +Patch105: 05_check_linux_raid_fix_striped.dpatch +Patch110: 10_check_disk_smb_spaces.dpatch +Patch111: 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch +Patch113: 13_check_smtp_greeting.dpatch +Patch114: 14_check_icmp_multiple_ips.dpatch +Patch115: 15_check_sensors_fault.dpatch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bind-utils fping iputils procps samba-client BuildRequires: dhcp-devel gnutls-devel libsmbclient-devel @@ -51,6 +56,7 @@ BuildRequires: net-snmp-devel openldap2-devel openssh BuildRequires: openssl-devel perl-Net-SNMP postfix postgresql-devel BuildRequires: python-devel +BuildRequires: nagios-rpm-macros %if 0%{?suse_version} %if 0%{?suse_version} > 1020 BuildRequires: freeradius-client-devel @@ -79,19 +85,14 @@ This package contains those plugins. - - -Authors: --------- - Karl DeBisschop <kdebisschop@users.sourceforge.net> - and others - %package extras Summary: Nagios Plug-Ins which depend on additional packages License: GPLv2+ Group: System/Monitoring Requires: %{name} = %{version} -Requires: openssl net-snmp fping +Requires: openssl +Requires: net-snmp +Recommends: %{name}-fping %if 0%{?suse_version} > 1020 Requires: freeradius-client %else @@ -103,12 +104,22 @@ They depend on other packages which have to be installed. +%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 bgpstate +Summary: Monitor BGP sessions with Nagios +Group: System/Monitoring +Requires: whois -Authors: --------- - Karl DeBisschop <kdebisschop@users.sourceforge.net> - and others +%description bgpstate +Perl bgpstate plugin for Nagios monitors all BGP sessions. %prep %setup -q -n %{name}-%{version} @@ -127,6 +138,13 @@ %patch11 %patch12 %patch13 +# Debian patches +%patch105 -p1 +%patch110 -p1 +%patch111 -p1 +%patch113 -p1 +%patch114 -p1 +%patch115 -p1 pushd contrib %{__rm} -r aix find -type f -exec %{__chmod} 644 {} \; @@ -135,44 +153,62 @@ %build export CFLAGS="%optflags -fno-strict-aliasing -DLDAP_DEPRECATED" %configure \ - --libexecdir=%{libexecdir} \ - --with-cgiurl=/nagios/cgi-bin \ - --sysconfdir=%{_sysconfdir}/nagios \ --enable-static=no \ --enable-extra-opts \ + --libexecdir=%{nagios_plugindir} \ + --sysconfdir=%{nagios_sysconfdir} \ + --with-apt-get-command=%{_bindir}/apt-get \ + --with-cgiurl=/nagios/cgi-bin \ --with-fping-command=%{_sbindir}/fping \ --with-ipv6 \ - --with-ping6-command='/bin/ping6 -n -U -w %d -c %d %s' \ - --with-apt-get-command=%{_bindir}/apt-get \ - --with-qstat-command=%{_bindir}/qstat \ - --with-rpcinfo-command=%{_sbindir}/rpcinfo \ --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-mysql + --with-rpcinfo-command=%{_sbindir}/rpcinfo \ + --with-qstat-command=%{_bindir}/qstat \ + --with-mysql=%{_prefix} \ + --disable-rpath #--enable-perl-modules make all %{?jobs:-j%jobs} %install sed -i 's,^MKINSTALLDIRS.*,MKINSTALLDIRS = ../mkinstalldirs,' po/Makefile -%makeinstall -%{__install} -m 0755 %{S:10} $RPM_BUILD_ROOT%{libexecdir}/check_xenvm -%{__install} -m 0755 contrib/check_linux_raid.pl $RPM_BUILD_ROOT%{libexecdir}/ -%{__install} -m 0755 contrib/check_netapp.pl $RPM_BUILD_ROOT%{libexecdir}/ +%makeinstall install-root +%{__install} -m 0755 %{S:10} $RPM_BUILD_ROOT%{nagios_plugindir}/check_xenvm +%{__install} -m 0755 contrib/check_linux_raid.pl $RPM_BUILD_ROOT%{nagios_plugindir}/check_linux_raid +%{__install} -m 0755 contrib/check_netapp.pl $RPM_BUILD_ROOT%{nagios_plugindir}/check_netapp +%{__install} -m 0755 contrib/check_bgpstate.pl $RPM_BUILD_ROOT%{nagios_plugindir}/check_bgpstate +# 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%{libexecdir} +pushd $RPM_BUILD_ROOT%{nagios_plugindir} for file in $(find -maxdepth 1 -type f); do - sed -i 's|use lib "nagios/plugins".*;|use lib "%{libexecdir}";|g; - s|use lib "/usr/local/nagios/libexec".*;|use lib "%{libexecdir}";|g' $file + 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 +# provide *.pl files for backwards compatibility +for i in check_linux_raid check_netapp ; do + ln -s $i ${i}.pl done popd # check_sensors makes no sense on some archs %ifarch ppc ppc64 sparc sparc64 -%{__rm} -f %{buildroot}%{libexecdir}/check_sensors +%{__rm} -f %{buildroot}%{nagios_plugindir}/check_sensors %endif %find_lang %{name} @@ -192,45 +228,54 @@ %doc contrib %doc command.cfg %dir %{_prefix}/lib/nagios -%dir %{libexecdir} +%dir %{nagios_plugindir} # %defattr(0755,root,root) -%{libexecdir}/* -%exclude %{libexecdir}/check_fping -%exclude %{libexecdir}/check_hpjd -%exclude %{libexecdir}/check_ldap -%exclude %{libexecdir}/check_ldaps -%exclude %{libexecdir}/check_mysql -%exclude %{libexecdir}/check_mysql_query -%exclude %{libexecdir}/check_pgsql -#%exclude %{libexecdir}/check_radius -%exclude %{libexecdir}/check_snmp -%exclude %{libexecdir}/check_jabber -%exclude %{libexecdir}/check_nntps -%exclude %{libexecdir}/check_simap -%exclude %{libexecdir}/check_spop -%exclude %{libexecdir}/check_ssmtp -%exclude %{libexecdir}/check_apt -%exclude %{libexecdir}/check_game -%attr(0644,root,root) %{libexecdir}/utils.pm +%{nagios_plugindir}/* +%exclude %{nagios_plugindir}/check_fping +%exclude %{nagios_plugindir}/check_hpjd +%exclude %{nagios_plugindir}/check_ldap +%exclude %{nagios_plugindir}/check_ldaps +%exclude %{nagios_plugindir}/check_mysql +%exclude %{nagios_plugindir}/check_mysql_query +%exclude %{nagios_plugindir}/check_pgsql +#%exclude %{nagios_plugindir}/check_radius +%exclude %{nagios_plugindir}/check_snmp +%exclude %{nagios_plugindir}/check_jabber +%exclude %{nagios_plugindir}/check_nntps +%exclude %{nagios_plugindir}/check_simap +%exclude %{nagios_plugindir}/check_spop +%exclude %{nagios_plugindir}/check_ssmtp +%exclude %{nagios_plugindir}/check_apt +%exclude %{nagios_plugindir}/check_game +%exclude %{nagios_plugindir}/check_bgpstate +%attr(0644,root,root) %{nagios_plugindir}/utils.pm %files extras %defattr(0755,root,root) -%{libexecdir}/check_fping -%{libexecdir}/check_hpjd -%{libexecdir}/check_ldap -%{libexecdir}/check_ldaps -%{libexecdir}/check_mysql -%{libexecdir}/check_mysql_query -%{libexecdir}/check_pgsql -#%{libexecdir}/check_radius -%{libexecdir}/check_snmp -%{libexecdir}/check_jabber -%{libexecdir}/check_nntps -%{libexecdir}/check_simap -%{libexecdir}/check_spop -%{libexecdir}/check_ssmtp -%{libexecdir}/check_apt -%{libexecdir}/check_game +%{nagios_plugindir}/check_hpjd +%{nagios_plugindir}/check_ldap +%{nagios_plugindir}/check_ldaps +%{nagios_plugindir}/check_mysql +%{nagios_plugindir}/check_mysql_query +%{nagios_plugindir}/check_pgsql +#%{nagios_plugindir}/check_radius +%{nagios_plugindir}/check_snmp +%{nagios_plugindir}/check_jabber +%{nagios_plugindir}/check_nntps +%{nagios_plugindir}/check_simap +%{nagios_plugindir}/check_spop +%{nagios_plugindir}/check_ssmtp +%{nagios_plugindir}/check_apt +%{nagios_plugindir}/check_game + +%files fping +%defattr(0755,root,root) +%{nagios_plugindir}/check_fping + +%files bgpstate +%defattr(0755,root,root) +%dir %{nagios_plugindir} +%{nagios_plugindir}/check_bgpstate %changelog ++++++ 05_check_linux_raid_fix_striped.dpatch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 05_check_linux_raid_fix_striped.dpatch by Thomas Guyot-Sionnest <dermoth@aei.ca> ## ## DP: Fix RAID0 and linear volumes (http://bugs.debian.org/579049) ## DP: Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/621380 ## DP: Upstream bug is: http://sourceforge.net/tracker/?func=detail&aid=3049988&group_id=29880&atid=397597 @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.15~/contrib/check_linux_raid.pl nagios-plugins-1.4.15/contrib/check_linux_raid.pl --- nagios-plugins-1.4.15~/contrib/check_linux_raid.pl 2010-07-27 22:47:15.000000000 +0200 +++ nagios-plugins-1.4.15/contrib/check_linux_raid.pl 2010-09-23 09:00:11.000000000 +0200 @@ -71,7 +71,8 @@ } elsif (/^($nextdev)\s*:/) { $device=$1; $devices{$device}=$device; - if (/active/) { + if (/\sactive/) { + $status{$device} = ''; # Shall be filled later if available $active{$device} = 1; } } @@ -80,7 +81,11 @@ } foreach my $k (sort keys %devices){ - if ($status{$k} =~ /_/) { + if (!exists($status{$k})) { + $msg .= sprintf " %s inactive with no status information.", + $devices{$k}; + $code = max_state($code, "CRITICAL"); + } elsif ($status{$k} =~ /_/) { if (defined $recovery{$k}) { $msg .= sprintf " %s status=%s, recovery=%s, finish=%s.", $devices{$k}, $status{$k}, $recovery{$k}, $finish{$k}; @@ -94,10 +99,11 @@ $code = max_state($code, "OK"); } else { if ($active{$k}) { - $msg .= sprintf " %s active with no status information.\n", + $msg .= sprintf " %s active with no status information.", $devices{$k}; $code = max_state($code, "OK"); } else { + # This should't run anymore, but is left as a catch-all $msg .= sprintf " %s does not exist.\n", $devices{$k}; $code = max_state($code, "CRITICAL"); } ++++++ 10_check_disk_smb_spaces.dpatch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 10_check_disk_smb_spaces.dpatch by ## Matthias Eble <psychotrahe@users.sourceforge.net> ## ## From 0892c4ac28c4c2e3b6275187f845813b4cd6d320 Mon Sep 17 00:00:00 2001 ## From: Matthias Eble <psychotrahe@users.sourceforge.net> ## Date: Sun, 28 Nov 2010 21:35:59 +0100 ## Subject: [PATCH] Make check_disk_smb accept spaces in share names ## (#990948, #1370031, Debian #601699) ## ## DP: Enables Support sharenames with spaces (http://bugs.debian.org/601699) ## DP: Upstream bug is: http://sourceforge.net/tracker/?func=detail&aid=990948&group_id=29880&atid=397597 @DPATCH@ diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index 7c81fc2..4698700 100755 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl @@ -67,7 +67,7 @@ my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/); ($host) || usage("Invalid host: $opt_H\n"); ($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n"); -my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9]+\$?)$/); +my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9 ]+\$?)$/); ($share) || usage("Invalid share: $opt_s\n"); defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest"); ++++++ 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 11_check_disk_smb_NT_STATUS_ACCESS_DENIED.dpatch by ## Matthias Eble <psychotrahe@users.sourceforge.net> ## ## From 3c67c9cb60a4681a29e509fccbb333e0f6234f54 Mon Sep 17 00:00:00 2001 ## From: Matthias Eble <psychotrahe@users.sourceforge.net> ## Date: Sun, 28 Nov 2010 21:43:48 +0100 ## Subject: [PATCH] check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly ## (Debian #601696) ## ## DP: Handles NT_STATUS_ACCESS_DENIED properly (http://bugs.debian.org/601696) @DPATCH@ diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index 4698700..6783543 100755 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl @@ -239,7 +239,7 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) { $answer = "Result from smbclient not suitable\n"; $state = "UNKNOWN"; foreach (@lines) { - if (/(Access denied|NT_STATUS_LOGON_FAILURE)/) { + if (/(Access denied|NT_STATUS_LOGON_FAILURE|NT_STATUS_ACCESS_DENIED)/) { $answer = "Access Denied\n"; $state = "CRITICAL"; last; ++++++ 13_check_smtp_greeting.dpatch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 13_check_smtp_greeting.dpatch ## Holger Weiss <holger@zedat.fu-berlin.de> ## ## From: d16f3fb0a9bb37cc1ce73ef14b5de83e907ef23c Tue, 8 Feb 2011 16:07:52 +0000 (+0100) ## From: Holger Weiss <holger@zedat.fu-berlin.de> ## Date: Tue, 8 Feb 2011 16:07:52 +0000 (+0100) ## Subject: [PATCH] check_smtp: Abort on missing/unexpected greeting ## (Debian #611914) ## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug%2Fnagiospl... ## ## DP: Abort on missing/unexpected greeting (http://bugs.debian.org/611914) @DPATCH@ diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 3da724b..ed49163 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -183,7 +183,7 @@ main (int argc, char **argv) /* return a WARNING status if we couldn't read any data */ if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) { printf (_("recv() failed\n")); - result = STATE_WARNING; + return STATE_WARNING; } else { if (verbose) @@ -197,7 +197,7 @@ main (int argc, char **argv) else printf (_("Invalid SMTP response received from host on port %d: %s\n"), server_port, buffer); - result = STATE_WARNING; + return STATE_WARNING; } } ++++++ 14_check_icmp_multiple_ips.dpatch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 14_check_icmp_multiple_ips.dpatch ## Sebastian Harl <sh@teamix.net> ## ## From: 1374f80872412b64bd13f17e6edd70aa59437012 Mon Sep 17 00:00:00 2001 ## From: Sebastian Harl <sh@teamix.net> ## Date: Thu, 28 Apr 2011 09:18:21 +0200 ## Subject: [PATCH] check_host: Allocate a large-enough buffer for the host table. ## (Debian #623702) ## X-Git-Url: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug... ## ## DP: Allocate a large-enough buffer for the host table. (http://bugs.debian.org/623702) @DPATCH@ --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -621,7 +621,7 @@ main(int argc, char **argv) } host = list; - table = malloc(sizeof(struct rta_host **) * (argc - 1)); + table = malloc(sizeof(struct rta_host **) * targets); i = 0; while(host) { host->id = i*packets; ++++++ 15_check_sensors_fault.dpatch ++++++ #! /bin/sh /usr/share/dpatch/dpatch-run ## 15_check_sensors_fault.dpatch by Jan Wagner <waja@cyconet.org> ## ## DP: Report UNKNOWN if sensor is faulty (fixing #615133) @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.15~/plugins-scripts/check_sensors.sh nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh --- nagios-plugins-1.4.15~/plugins-scripts/check_sensors.sh 2010-07-27 22:47:16.000000000 +0200 +++ nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh 2011-05-17 22:17:38.000000000 +0200 @@ -10,7 +10,7 @@ print_usage() { - echo "Usage: $PROGNAME" + echo "Usage: $PROGNAME [--ignore-fault]" } print_help() { @@ -57,6 +57,13 @@ if echo ${sensordata} | egrep ALARM > /dev/null; then echo SENSOR CRITICAL - Sensor alarm detected! exit 2 + elif echo ${sensordata} | egrep FAULT > /dev/null; then + echo SENSOR UNKNOWN - Sensor reported fault + if test "$1" != "-i" -a "$1" != "--ignore-fault"; then + exit 3 + else + exit 0 + fi else echo sensor ok exit 0 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org