From 15b9e64a88651f2a398986407bb2dac8db122dd3 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 4 Mar 2012 16:22:37 +0000 Subject: [PATCH 1/9] fixed missing tempfile cleanup --- check_nagios/check_nagios_configuration | 1 + 1 file changed, 1 insertion(+) diff --git a/check_nagios/check_nagios_configuration b/check_nagios/check_nagios_configuration index 3e7ef74..08c0ea5 100755 --- a/check_nagios/check_nagios_configuration +++ b/check_nagios/check_nagios_configuration @@ -6,6 +6,7 @@ MESSAGE="Nagios configuration is valid" EXIT_CODE=3 TMPFILE=`mktemp` +trap "rm -f $TMPFILE" EXIT nagios -v /etc/nagios/nagios.cfg > $TMPFILE RESULT=$? From 9248569b6d77d9121f120121203a445a55242cf9 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Fri, 20 Apr 2012 14:37:54 +0000 Subject: [PATCH 2/9] Issue 49, fixed typo for blower --- check_ibm_bladecenter/check_ibm_bladecenter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_ibm_bladecenter/check_ibm_bladecenter.py b/check_ibm_bladecenter/check_ibm_bladecenter.py index 7198ff1..7bbc658 100644 --- a/check_ibm_bladecenter/check_ibm_bladecenter.py +++ b/check_ibm_bladecenter/check_ibm_bladecenter.py @@ -300,7 +300,7 @@ def check_blowers(): # Check blower 2 if blower2state == "1": nagios_status(ok) - add_summary("Blower1 OK. " ) + add_summary("Blower2 OK. " ) else: add_summary("Blower2 NOT OK. ") nagios_status(warning) From ed9d2eb2b90db41ce5b799574db377cff5488c85 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Fri, 20 Apr 2012 14:39:47 +0000 Subject: [PATCH 3/9] Added noarch buildarch --- check_apcext.pl/trunk/nagios-okplugin-apc.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/check_apcext.pl/trunk/nagios-okplugin-apc.spec b/check_apcext.pl/trunk/nagios-okplugin-apc.spec index ac830db..fbada26 100644 --- a/check_apcext.pl/trunk/nagios-okplugin-apc.spec +++ b/check_apcext.pl/trunk/nagios-okplugin-apc.spec @@ -11,6 +11,7 @@ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_apcext.pl/rel Requires: nagios-plugins BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Packager: Tomas Edwardsson +BuildArch: noarch %description From 381aef115655be588f5c1422a2b2811d927bd97e Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Fri, 20 Apr 2012 14:40:13 +0000 Subject: [PATCH 4/9] Updated buildarch to noarch --- check_bl/trunk/nagios-okplugin-mailblacklist.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check_bl/trunk/nagios-okplugin-mailblacklist.spec b/check_bl/trunk/nagios-okplugin-mailblacklist.spec index 58eae6a..8d265e9 100644 --- a/check_bl/trunk/nagios-okplugin-mailblacklist.spec +++ b/check_bl/trunk/nagios-okplugin-mailblacklist.spec @@ -2,7 +2,7 @@ Summary: A Nagios plugin to check SMTP blacklists Name: nagios-okplugin-mailblacklist -Version: 0.0.1 +Version: 0.0.2 Release: 1%{?dist} License: GPLv2+ Group: Applications/System @@ -12,6 +12,7 @@ Requires: nagios-plugins Requires: nagios-plugins-perl BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Packager: Tomas Edwardsson +BuildArch: noarch %description From d6f9b6093fcab8f4d92541c47c1885ccb36bfbb0 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Fri, 20 Apr 2012 14:40:54 +0000 Subject: [PATCH 5/9] Updates buildarch to noarch --- check_cifs/trunk/nagios-okplugin-cifs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/check_cifs/trunk/nagios-okplugin-cifs.spec b/check_cifs/trunk/nagios-okplugin-cifs.spec index 913f17f..e9fc9c2 100644 --- a/check_cifs/trunk/nagios-okplugin-cifs.spec +++ b/check_cifs/trunk/nagios-okplugin-cifs.spec @@ -12,6 +12,7 @@ Requires: perl-Nagios-Plugin Requires: samba-client, krb5-workstation BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Packager: Tomas Edwardsson +BuildArch: noarch %description From ddaad8f39dff47745ae79450accece603b713cd9 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Fri, 20 Apr 2012 14:41:11 +0000 Subject: [PATCH 6/9] Updates buildarch to noarch --- check_cpu.sh/trunk/nagios-plugins-check_cpu.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/check_cpu.sh/trunk/nagios-plugins-check_cpu.spec b/check_cpu.sh/trunk/nagios-plugins-check_cpu.spec index 6534075..96ef917 100644 --- a/check_cpu.sh/trunk/nagios-plugins-check_cpu.spec +++ b/check_cpu.sh/trunk/nagios-plugins-check_cpu.spec @@ -11,6 +11,7 @@ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_cpu/releases/ Requires: nrpe BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Packager: Tomas Edwardsson +BuildArch: noarch %description This shell script checks cpu utilization (user,system,iowait,idle in %) From ceda55b389bac0853456a2ac95f4724a704a0615 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Mon, 23 Apr 2012 12:43:14 +0000 Subject: [PATCH 7/9] make sure plugin exits cleanly if unable to run clustat -fx command --- check_rhcs/trunk/check_rhcs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/check_rhcs/trunk/check_rhcs b/check_rhcs/trunk/check_rhcs index dd29676..4ca9d49 100644 --- a/check_rhcs/trunk/check_rhcs +++ b/check_rhcs/trunk/check_rhcs @@ -120,9 +120,12 @@ def main(): usage() sys.exit() - clustatOutput = os.popen('/usr/sbin/clustat -fx') - dom = xml.dom.minidom.parse(clustatOutput) - + try: + clustatOutput = os.popen('/usr/sbin/clustat -fx') + dom = xml.dom.minidom.parse(clustatOutput) + except Exception, e: + print "Error: could not parse output of : '/usr/sbin/clustat -fx': ", e + sys.exit(3) if typeCheck == 'cluster': # First we query for the state of the cluster itself. From 6f5041d8cd79322684ce516290acc3ab9bd9bc0d Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Thu, 10 May 2012 11:17:49 +0000 Subject: [PATCH 8/9] Issue 56, temporary fix for selinux and disk checks --- check_disks.pl/check_disks.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_disks.pl/check_disks.pl b/check_disks.pl/check_disks.pl index f6e3753..6c2f3a1 100755 --- a/check_disks.pl/check_disks.pl +++ b/check_disks.pl/check_disks.pl @@ -207,16 +207,17 @@ if($opt_H ne "localhost" and $opt_H ne "127.0.0.1") { # Envoi commande et renseignement Hashage %disks my @output = `$cmd`; + my $ret = $?; +$ret >>= 8; if ($ret == -1) { print "Could not find " . (split(' ', $cmd))[0] . "\n"; exit $EXIT_CODES{'UNKNOWN'}; } -$ret >>= 8; # 2010/02/25 palli@ok.is : Check if $cmd ran successfully -if ($ret > 0) { +if ($ret > 1) { print "Failed to execute $cmd: " . join("\n", @output) . "\n"; exit $EXIT_CODES{'UNKNOWN'} ; } From 682ad04b9e6a5ae7024b4184969c8aab7a5b66a5 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Thu, 10 May 2012 11:17:49 +0000 Subject: [PATCH 9/9] Issue #56, temporary fix for selinux and disk checks --- check_disks.pl/check_disks.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_disks.pl/check_disks.pl b/check_disks.pl/check_disks.pl index f6e3753..6c2f3a1 100755 --- a/check_disks.pl/check_disks.pl +++ b/check_disks.pl/check_disks.pl @@ -207,16 +207,17 @@ if($opt_H ne "localhost" and $opt_H ne "127.0.0.1") { # Envoi commande et renseignement Hashage %disks my @output = `$cmd`; + my $ret = $?; +$ret >>= 8; if ($ret == -1) { print "Could not find " . (split(' ', $cmd))[0] . "\n"; exit $EXIT_CODES{'UNKNOWN'}; } -$ret >>= 8; # 2010/02/25 palli@ok.is : Check if $cmd ran successfully -if ($ret > 0) { +if ($ret > 1) { print "Failed to execute $cmd: " . join("\n", @output) . "\n"; exit $EXIT_CODES{'UNKNOWN'} ; }