We have configured the "processes" probe to monitor a java process for Tomcat. The probe is sending alarms as if the process is down (as shown in Figure 1).
However, when we check the robot machine, the process is running. For example:
processsesRobotHostname:~ # ps aux | grep "/usr/java/java8/bin"
root 12850 0.0 0.0 4552 560 pts/1 S+ 13:58 0:00 grep /usr/java/java8/bin
ssuser 30002 3.7 3.5 5461372 433548 ? Sl Oct01 120:12 /usr/java/java8/bin/java -Djava.util.logging.config.file=/opt/tomcat-8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dss.config=/opt/searchservice/config -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /opt/tomcat-8/bin/bootstrap.jar:/opt/tomcat-8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat-8 -Dcatalina.home=/opt/tomcat-8 -Djava.io.tmpdir=/opt/tomcat-8/temp org.apache.catalina.startup.Bootstrap start
We are monitoring the "/usr/java/java8/bin" folder (as shown in Figure 2).
We are using the "binary path" as opposed to the "name" as we have multiple java processes running on the same machine.
The "name + command line" did not work. So, we used "binary path" to point to the directory the java process is running from.