Check for two instances of Java on different ports
Posted: Tue Nov 28, 2017 7:31 am
Good afternoon, I have been tasked with monitoring if two instances of java.exe are running on a remote host - one on (for example) port 8888 and the other on port 9999.
From the command line, I get:
My user insists that the port numbers are correct.
On RDPing to the machine in question, I can see that there are three instances of Jave.exe running, of which two (the ones I'm interested in) run under the same User Name. So, if I can't monitor on Port 8888 or 9999, is there any way in which I can check to see if there are two Jave.exe s running on the host under that user name with OK = 2 running instances and Critical = < 2 running instances?
[EDIT] I have added the password for the User name which is an internal service account, using the "-s" paramater, but the results are the same.
Thanks in advance for your help.
Pete
From the command line, I get:
Code: Select all
./check_nt -H MyServer -p 12489 -v PROCSTATE -l java.exe -d SHOWALL
java.exe: Running, java.exe: Running, java.exe: Running
./check_nt -H MyServer -p 8888 -v PROCSTATE -l java.exe -d SHOWALL
No data was received from host!
could not fetch information from server
./check_nt -H MyServer -p 9999 -v PROCSTATE -l java.exe -d SHOWALL
No data was received from host!
could not fetch information from server
On RDPing to the machine in question, I can see that there are three instances of Jave.exe running, of which two (the ones I'm interested in) run under the same User Name. So, if I can't monitor on Port 8888 or 9999, is there any way in which I can check to see if there are two Jave.exe s running on the host under that user name with OK = 2 running instances and Critical = < 2 running instances?
[EDIT] I have added the password for the User name which is an internal service account, using the "-s" paramater, but the results are the same.
Thanks in advance for your help.
Pete