I want to monitor a java process on a windows machine with nagios. On the windows server with process explorer I can see that the java process is started with "java -jar myApp.jar" in the command line. I've installed the NSClient++ and want to use the CheckProcState plugin.
check_nrpe -H 192.168.1.100 -p 5666 -c CheckProcState -a cmdLine ShowAll "java.exe"=started
gives me
OK: java.exe: 1|'java.exe'=1;0;0
but if I also want to check the command line
check_nrpe -H 192.168.1.100 -p 5666 -c CheckProcState -a cmdLine ShowAll "java.exe java -jar myApp.jar"=started
I get:
CRITICAL: java.exe java -jar myApp.jar: stopped (critical)|'java.exe ja'=0;0;0
How can I check the command line correctly with the CheckProcState plugin?