problem running checks from nagios server for cpu

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

problem running checks from nagios server for cpu

Post 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
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: problem running checks from nagios server for cpu

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: problem running checks from nagios server for cpu

Post 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
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: problem running checks from nagios server for cpu

Post by ravish78 »

resolved after restarting nrpe .You can close this
Locked