Page 1 of 1
AIX CPU Stats
Posted: Thu Sep 04, 2014 2:55 pm
by costanza2k1
Do you guys know why I'm not getting performance graphs from AIX?
AIX CPU.png
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 2:58 pm
by tmcdonald
Not really. Let's see the performance data being returned. Please go to the Service Details page, click the service, and go to the Advanced tab. Send a screenshot.
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 3:01 pm
by costanza2k1
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 3:06 pm
by tmcdonald
That would certainly be why - it looks like you are getting no performance data!
Please run the following from the command line as root and post the results:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <remote AIX host IP> -t 30 -c check_aix_cpu -a '-w 80 -c 90'
of course replacing "<remote AIX host IP>" with the actual IP.
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 3:08 pm
by costanza2k1
Code: Select all
[root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H xx.xxx.xxx.xxx -t 30 -c check_aix_cpu -a '-w 80 -c 90'
WARNING - CPU usage at 82.25%
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 3:12 pm
by tmcdonald
Can you provide a link to the plugin that is being run by check_aix_cpu on the remote machine? My guess is that plugin simply does not provide perfdata.
If it is this one:
http://exchange.nagios.org/directory/Pl ... ge/details
then this seems to be the case. It's a relatively short perl script though, and it might not be too hard to hack in the perfdata if you have a perl person on your team.
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 3:16 pm
by costanza2k1
That's the one...this can be closed...I'll have someone work with me...thanks!
Re: AIX CPU Stats
Posted: Thu Sep 04, 2014 3:17 pm
by tmcdonald
Actually, I happen to be a perl guy and this should be dead simple. Change this:
Code: Select all
if ($usage >= $crit) {
printf("CRITICAL - CPU usage at $usage%\n");
exit($STATUSCODE{"CRITICAL"});
}
elsif ($usage >= $warn) {
printf("WARNING - CPU usage at $usage%\n");
exit($STATUSCODE{"WARNING"});
}
elsif ($usage < $warn) {
printf("OK - CPU usage at $usage%\n");
exit($STATUSCODE{"OK"});
}
to this:
Code: Select all
if ($usage >= $crit) {
printf("CRITICAL - CPU usage at $usage%|cpu=$usage%\n");
exit($STATUSCODE{"CRITICAL"});
}
elsif ($usage >= $warn) {
printf("WARNING - CPU usage at $usage%|cpu=$usage%\n");
exit($STATUSCODE{"WARNING"});
}
elsif ($usage < $warn) {
printf("OK - CPU usage at $usage%|cpu=$usage%\n");
exit($STATUSCODE{"OK"});
}
Re: AIX CPU Stats
Posted: Tue Sep 30, 2014 3:14 pm
by costanza2k1
Thanks!!!