mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-12-22 09:03:54 +01:00
Merge branch 'master' of http://opensource.ok.is/git/misc
This commit is contained in:
commit
27f4da23bf
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 %)
|
||||
|
@ -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'} ;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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=$?
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user