diff --git a/check_apcext.pl/nagios-okplugin-apc.spec b/check_apcext.pl/nagios-okplugin-apc.spec index 7ac35bb..dcacd0c 100644 --- a/check_apcext.pl/nagios-okplugin-apc.spec +++ b/check_apcext.pl/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 diff --git a/check_bl/nagios-okplugin-mailblacklist.spec b/check_bl/nagios-okplugin-mailblacklist.spec index 2fb6469..94715f7 100644 --- a/check_bl/nagios-okplugin-mailblacklist.spec +++ b/check_bl/nagios-okplugin-mailblacklist.spec @@ -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 diff --git a/check_cifs/nagios-okplugin-cifs.spec b/check_cifs/nagios-okplugin-cifs.spec index b877a86..da5c0c9 100644 --- a/check_cifs/nagios-okplugin-cifs.spec +++ b/check_cifs/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 diff --git a/check_cpu.sh/nagios-plugins-check_cpu.spec b/check_cpu.sh/nagios-plugins-check_cpu.spec index 6b992fd..c4d48d6 100644 --- a/check_cpu.sh/nagios-plugins-check_cpu.spec +++ b/check_cpu.sh/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 %) 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'} ; } 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) 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=$? diff --git a/check_rhcs/check_rhcs b/check_rhcs/check_rhcs index dd29676..4ca9d49 100644 --- a/check_rhcs/check_rhcs +++ b/check_rhcs/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.