Page 1 of 1

problem running checks from nagios server for cpu

Posted: Fri Oct 11, 2013 3:05 pm
by ravish78
Team

We are getting issue while checking cpu utilization on client from nagios. Getting "NRPE: Command 'check_CPU_utilization2' not defined" .
It is working fine on one server but giving error on other server

bash-3.2$ ./check_nrpe -n -t 60 -H usa0300lv605.epn.useastgw.xerox.com -c check_CPU_utilization
CPU OK : user=1% system=1% iowait=0% idle=98% | cpu_user=1%;55;60; cpu_sys=1%;55;60; cpu_iowait=0%;55;60; cpu_idle=98%;
-bash-3.2$ ./check_nrpe -n -t 60 -H usa0300ux321.apps.mc.xerox.com -c check_CPU_utilization2
NRPE: Command 'check_CPU_utilization2' not defined


These are defined on remote client in nrpe.cfg file
command[check_CPU_utilization1]=/usr/local/nagios/libexec/check_cpu.sh -w 55 -c 60
command[check_CPU_utilization2]=/usr/local/nagios/libexec/check_solaris_cpu_usage.sh -w 55 -c 60

checks are working fine on client
tmproot@usa0300ux321>/usr/local/nagios/libexec/check_cpu.sh -w 55 -c 60
CPU OK : user=0% system=1% iowait=0% idle=98% | cpu_user=0%;55;60; cpu_sys=1%;55;60; cpu_iowait=0%;55;60; cpu_idle=98%;
tmproot@usa0300ux321>/usr/local/nagios/libexec/check_solaris_cpu_usage.sh -w 55 -c 60
CPU USAGE CRITICAL - 2% (usr=1 sys=1 idle=98)|usage=2 usr=1 sys=1 idle=98

Re: problem running checks from nagios server for cpu

Posted: Fri Oct 11, 2013 3:20 pm
by BanditBBS
Did you restart the NRPE client after defining those check commands in the NRPE.cfg?

Your first example doesn't have a 1 on the end of the working command, yet in the NRPE.cfg you only have commands defined with a 1 and a 2 on the end.

Re: problem running checks from nagios server for cpu

Posted: Fri Oct 11, 2013 6:17 pm
by ravish78
I don't think that will cause issue. Changed again according to your requirement

--------working environment------------------

client side
command[check_CPU_utilization]=/usr/local/nagios/libexec/check_cpu.sh -w 55 -c 60

server side
-bash-4.1$ ./check_nrpe -n -t 60 -H usa0300lv605.epn.useastgw.xerox.com -c check_CPU_utilization
CPU OK : user=0% system=0% iowait=0% idle=100% | cpu_user=0%;55;60; cpu_sys=0%;55;60; cpu_iowait=0%;55;60; cpu_idle=100%;

----------non working environment------------------

Another client side
command[check_CPU_utilization]=/usr/local/nagios/libexec/check_cpu.sh -w 55 -c 60
command[check_CPU_utilization2]=/usr/local/nagios/libexec/check_solaris_cpu_usage.sh -w 55 -c 60

Another server side
-bash-3.2$ ./check_nrpe -n -H usa0300ux321.apps.mc.xerox.com -t 30 -c check_CPU_utilization
NRPE: Command 'check_CPU_utilization' not defined
-bash-3.2$ ./check_nrpe -n -H usa0300ux321.apps.mc.xerox.com -t 30 -c check_CPU_utilization2
NRPE: Command 'check_CPU_utilization2' not defined
----------------------


Can you let us know how to restart nrpe in solaris 10

Re: problem running checks from nagios server for cpu

Posted: Fri Oct 11, 2013 9:26 pm
by ravish78
resolved after restarting nrpe .You can close this