Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It looks like a bug. I have tried with the latest version:

$ check_nrpe -H IP -p 5666 -c checkVersion
0.3.9.328 2011-08-16

check_nrpe -H IP -p 5666 -c checkProcState -a match=substr cmdLine ShowAll=long "gmond.conf"
CRITICAL: gmond.conf: stopped (critical)|'gmond.conf'=0;0;0

check_nrpe -H IP -p 5666 -c checkProcState -a match=regexp cmdLine ShowAll=long ".*gmond.exe.*gmond.conf.*"
CRITICAL: .*gmond.exe.*gmond.conf.*: stopped (critical)|'.*gmond.exe.*gmond.conf.*'=0;0;0

Both match=substr and match=regexp are return to CRITICAL, it seems that the cmdLine option is not working.

share|improve this answer
    
Do you know if there is another plugin that works with command line? –  markus Nov 3 '11 at 13:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.