The processes probe is reporting that the java process down when it is running

book

Article ID: 8448

calendar_today

Updated On:

Products

DX Infrastructure Management NIMSOFT PROBES

Issue/Introduction

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).

Figure 1:

<Please see attached file for image>

alarm_java.JPG

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).

Figure 2:

<Please see attached file for image>

config1.JPG

 

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.

Cause

The processes probe is looking for the "binary path".  In RedHat and other Linux distros, "java" may be an alias.

For example:

[[email protected] bin]# which java

/usr/bin/java

[[email protected] bin]# /usr/sbin/alternatives --config java

 

There are 5 programs which provide 'java'.

 

  Selection    Command

-----------------------------------------------

   1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java

*  2           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java

   3           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

   4           /opt/jdk1.8.0_144/bin

 + 5           /opt/jdk1.8.0_144/bin/java

 

 

Environment

UIM 8.5.1
processes probe 4.60

Resolution

Check whether the java process is using an alias or alternative.  Here are a few ways to check that.

Check the "Status" tab on the processes tab.  Look for the "Binary Path".  Is it different than the "Full Path/Command Line" (as shown in Figure 3).

Figure 3:

<Please see attached file for image>

status_tab.JPG

 

Check the RedHat Linux commands: "which java" and "/usr/sbin/alternatives --config java"  as shown above.

Check the output of the "Test" button in the "processes" probe configuration. For example as shown in Figure 4.

Figure 4:

<Please see attached file for image>

TestButton.JPG

 

Additional Information

Processes Probe Documentation

RedHat documentation on java alternative commands

You can also use a RegEx.
if the full process command was:
"java/bin/java -Djava.util.logging.config.file=/opt/CA/CABI/apache-tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli...."

I could use a regex, for example:

*java -Djava.util.logging.config.file\=/opt/CA/CABI/apache-tomcat/conf/logging.properties*

<Please see attached file for image>

processes probe configuration using regex and java

Attachments

1558695110989000008448_sktwi1f5rjvs16i19.jpeg get_app
1558695108984000008448_sktwi1f5rjvs16i18.jpeg get_app
1558695106990000008448_sktwi1f5rjvs16i17.jpeg get_app
1558695105258000008448_sktwi1f5rjvs16i16.jpeg get_app
1558695103449000008448_sktwi1f5rjvs16i15.jpeg get_app