Unknown command(s) errors on all services, on just one host
Posted: Thu Jun 30, 2016 2:48 pm
If I run from the shell on the nagios or client hosts, it works fine, but in the Nagios web page it says unknown command. This and the others that don't work are working fine on many other clients configured in the same way by an automated process.
I've read the troubleshooting NRPE doc and checked what's there. Now I'm a bit baffled...
Got any ideas?
From the nagios server:
# su - nagios -c "/usr/local/nagios/libexec/check_nrpe -H qa4am2mlesg001 -u -t 45 -c check_cpuload2 -a '50 20'"
OK: CPU Load = 1.02% | CpuUser=0.71; CpuNice=0.14; CpuSystem=0.16; CpuIowait=0.00; CpuSteal=0.00; CpuIdle=98.98:20:10
On the client:
# grep check_cpuload2 /usr/local/nagios/etc/nrpe.cfg
command[check_cpuload2]=/usr/local/nagios/libexec/check_cpu_perf.sh $ARG1$
# file /usr/local/nagios/libexec/check_cpu_perf.sh
/usr/local/nagios/libexec/check_cpu_perf.sh: Bourne-Again shell script text executable
ll /usr/local/nagios/libexec/check_cpu_perf.sh
-rwxr-xr-x 1 nagios nagios 6557 Jun 18 2015 /usr/local/nagios/libexec/check_cpu_perf.sh
# su - nagios -c "/usr/local/nagios/libexec/check_cpu_perf.sh 20 10"
OK: CPU Load = 0.19% | CpuUser=0.11; CpuNice=0.00; CpuSystem=0.07; CpuIowait=0.00; CpuSteal=0.00; CpuIdle=99.81:20:10
# grep only_from /etc/xinetd.d/nrpe
only_from = 127.0.0.1 172.30.130.52 172.30.130.53
# service xinetd status
xinetd (pid 18019) is running...
# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
I've read the troubleshooting NRPE doc and checked what's there. Now I'm a bit baffled...
Got any ideas?
From the nagios server:
# su - nagios -c "/usr/local/nagios/libexec/check_nrpe -H qa4am2mlesg001 -u -t 45 -c check_cpuload2 -a '50 20'"
OK: CPU Load = 1.02% | CpuUser=0.71; CpuNice=0.14; CpuSystem=0.16; CpuIowait=0.00; CpuSteal=0.00; CpuIdle=98.98:20:10
On the client:
# grep check_cpuload2 /usr/local/nagios/etc/nrpe.cfg
command[check_cpuload2]=/usr/local/nagios/libexec/check_cpu_perf.sh $ARG1$
# file /usr/local/nagios/libexec/check_cpu_perf.sh
/usr/local/nagios/libexec/check_cpu_perf.sh: Bourne-Again shell script text executable
ll /usr/local/nagios/libexec/check_cpu_perf.sh
-rwxr-xr-x 1 nagios nagios 6557 Jun 18 2015 /usr/local/nagios/libexec/check_cpu_perf.sh
# su - nagios -c "/usr/local/nagios/libexec/check_cpu_perf.sh 20 10"
OK: CPU Load = 0.19% | CpuUser=0.11; CpuNice=0.00; CpuSystem=0.07; CpuIowait=0.00; CpuSteal=0.00; CpuIdle=99.81:20:10
# grep only_from /etc/xinetd.d/nrpe
only_from = 127.0.0.1 172.30.130.52 172.30.130.53
# service xinetd status
xinetd (pid 18019) is running...
# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]