I have found seemingly inconsistent behavior of NRPE (v.3.2.1). I am running check_jvm plugin on the monitored hosts. All hosts have NRPE installed and configured exactly the same way. However, NRPE command on couple of hosts is not able to connect to JVM. Here is the info on config:
nrpe.cfg
Code: Select all
command[check_tomcat_threads]=/usr/bin/sudo -u tomcat8 /usr/local/nagios/libexec/check_jvm -n org.apache.catalina.startup.Bootstrap -p threads -w 195 -c 225
Code: Select all
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/
Code: Select all
root@server1:/usr/local/nagios/libexec# ./check_nrpe -H localhost -c check_load
OK - load average: 0.00, 0.00, 0.00|load1=0.000;0.150;0.300;0; load5=0.000;0.100;0.250;0; load15=0.000;0.050;0.200;0;
root@server1:/usr/local/nagios/libexec# ./check_nrpe -H localhost -c check_tomcat8
PROCS OK: 1 process with UID = 112 (tomcat8) | procs=1;;1:5;0;
root@server1:/usr/local/nagios/libexec# ./check_nrpe -H localhost -c check_tomcat_threads
UNKNOWN Can't connect to the JVM:
Code: Select all
root@server1:/usr/local/nagios/libexec# /usr/bin/sudo -u tomcat8 /usr/local/nagios/libexec/check_jvm -n org.apache.catalina.startup.Bootstrap -p threads -w 195 -c 225
OK 37 |threads=37;;;
Thanks.