https://support.nagios.com/forum/viewto ... 30#p238851
I followed the same steps and I managed to pass the initial error
Code: Select all
UNKNOWN Can't connect to the JVM
Code: Select all
./check_nrpe -H localhost -c check_jvm_threads
CHECK_NRPE: Error - Could not connect to ::: Connection reset by peer
sudoers file has been updated
My nrpe.cfg has the following commands:
Code: Select all
allowed_hosts=127.0.0.1,<nagios_server_ip>
# check_jvm
command[check_jvm_threads]=/usr/bin/sudo -u jenkins /usr/local/nagios/libexec/check_jvm -n remoting.jar -p threads -w 195 -c 225
Code: Select all
ps aux | grep java
ec2-user 10254 0.0 0.0 112712 972 pts/0 S+ 13:42 0:00 grep --color=auto java
jenkins 16361 0.0 0.0 113184 1580 ? Ss Nov08 0:00 bash -c cd "/home/jenkins" && java -jar remoting.jar -workDir /home/jenkins
jenkins 16370 0.6 1.8 7797188 291688 ? Sl Nov08 53:17 java -jar remoting.jar -workDir /home/jenkins
Code: Select all
sudo su - jenkins -c "java -jar /usr/local/bin/JvmInspector.jar all"
JVM pid: 16370
name: remoting.jar -workDir /home/jenkins
thread count: 27 (peak: 223)
class count: 5266
heap memory: max=3659530240|commited=115867648|used=71438600
non-heap memory: max=-1|commited=61997056|used=58888112
java version: 1.8.0_232 (Oracle Corporation)
java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre
jvm arguments: []
class path: remoting.jar