This commit is contained in:
Pall Sigurdsson 2012-05-11 13:33:07 +00:00
commit 27f4da23bf
8 changed files with 15 additions and 6 deletions

View File

@ -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 <tommi@ok.is>
BuildArch: noarch
%description

View File

@ -12,6 +12,7 @@ Requires: nagios-plugins
Requires: nagios-plugins-perl
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Packager: Tomas Edwardsson <tommi@ok.is>
BuildArch: noarch
%description

View File

@ -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 <tommi@ok.is>
BuildArch: noarch
%description

View File

@ -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 <tommi@ok.is>
BuildArch: noarch
%description
This shell script checks cpu utilization (user,system,iowait,idle in %)

View File

@ -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'} ;
}

View File

@ -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)

View File

@ -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=$?

View File

@ -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.