1

I have a Nagios monitoring system to monitor servers. I have a server in which WebSphere portal has been installed. I want to configure a system in which when there is high CPU usage/thread count increases, it automatically takes a thread dump. For this, I am using nagios plugin check_jvm. This plugin uses a jar called JvmInspector.jar. JvmInspector.jar should list all the jvm names which are running in the system.
Usage of JvmInspector.jar is as follows:

java -jar JvmInspector.jar all

When I am running this, it is showing an empty result although I have a running WebSphere portal server running. Inspite of this, I tried to run 'check_jvm' plugin but it shows the following result:

[root@dev03 libexec]# sudo -u root /usr/local/nagios/libexec/check_jvm -n WebSphere_Portal -p threads -w 105 -c 135

UNKNOWN Can't connect to the JVM:

Can anybody help me in this?

Rohlik
  • 1,286
  • 19
  • 28
Aditya Datta
  • 567
  • 2
  • 7
  • 17
  • `java -jar JvmInspector.jar all` show only JVM's for current user. Is your app running under root? – Rohlik Jun 27 '18 at 15:54
  • yes , my ' WebSphere portal ' is running under user 'root'. That's why it is surprising for me why it is not showing the JVMs ??...... – Aditya Datta Jun 27 '18 at 19:08
  • Can you try `bash -x /usr/local/nagios/libexec/check_jvm -n WebSphere_Portal -p threads -w 105 -c 135` as root? – Rohlik Jun 27 '18 at 19:15
  • Yes , I tried . But ultimately it also list the same output . Below is some part of the output because the whole stack trace is very large ---- – Aditya Datta Jun 28 '18 at 08:34
  • + PUID=0 + '[' -z 5431 ']' + expr 5431 : '[0-9]\+$' + '[' 0 = 0 ']' + TIMEOUT= + timeout --version + TIMEOUT='timeout 7' ++ timeout 7 java -jar /usr/local/bin/JvmInspector.jar 5431 + JVMDATA= + '[' 0 -ne 0 ']' + echo '' + grep 'class count' + p_unknown 'Can'\''t connect to the JVM: ' + echo 'UNKNOWN Can'\''t connect to the JVM: ' + exit 3 ........ Here 5431 is the process Id of WebSphere portal . – Aditya Datta Jun 28 '18 at 08:35
  • I think until JvmInspector.jar works properly & lists the jvm names , 'check_jvm' plugin won't work properly . – Aditya Datta Jun 28 '18 at 10:10
  • Are you using last version (0.5) of this plugin? Can you upload your trace to Pastebin for analyze? – Rohlik Nov 24 '18 at 12:42

0 Answers0