Page 1 of 1

Unable to get check_nrpe to find process on Linux server

Posted: Tue Apr 21, 2015 10:18 am
by srg1970nj
I am attempting to just add a single process to monitoring for a single host. In the Service Management, Common Settings tab the Check Command is check_nrpe, is selected. For the Command view the following is displayed:

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$

$ARG1$ is set for check_services

$ARGS2$ I have the following - -a 'Route /opt/nyfix/abim1/current/config/appia FMPQA2-100'

The process is not found...

I tried multiple variations of the process, the only way it is found is with the following:

-a '*FMPQA2-100*'

Unfortunately I cannot use that because there are multiple processes running on the server that have that string present. How to I ensure this process is found correctly?

Re: Unable to get check_nrpe to find process on Linux server

Posted: Tue Apr 21, 2015 10:26 am
by jolson
Please log on to the server you are trying to monitor, and run:

Code: Select all

ps aux
Please identify the service you are trying to monitor from the above output. It should have a unique string separating it from other services. You could then reset $ARG2$ on your Nagios server to use that unique string:

Code: Select all

-a 'unique string here'

Re: Unable to get check_nrpe to find process on Linux server

Posted: Tue Apr 21, 2015 10:38 am
by srg1970nj
This is the actual process -

nyfix 32501 0.0 3.1 5622396 1180812 ? Sl Apr10 10:13 /opt/nyfix/jdk/current/bin/java -XX:ErrorFile=/var/log/cores/abimerr-%p.log -Dappia.config.class=ConfFac -classpath /opt/nyfix/appia
/current/lib/appia.jar:/opt/nyfix/appia/current/lib/jdom.jar:/opt/nyfix/appia/current/lib/xercesImpl.jar:/opt/nyfix/appia/current/lib/xml-apis.jar:/opt/nyfix/appia/current/lib/jython.jar:/opt/nyfix
/appia/current/lib/protocols/FIX.jar:/opt/nyfix/appia/current/lib/protocols/fix43.jar:/opt/nyfix/appia/current/lib/protocols/fix44.jar:/opt/nyfix/appia/current/lib/protocols/fix50.jar:/opt/nyfix/ab
im/current/abim:/opt/oracle/product/10.2.0/jdbc/lib/classes12.zip:/opt/oracle/product/10.2.0/jdbc/lib/nls_charset12.jar:/opt/nyfix/appia/current/lib/protocols/legacyprotocols/FIX.jar:/opt/nyfix/app
ia/current/lib/FIX.jar:/opt/nyfix/appia/current/lib:/opt/nyfix/abim/current/customprotocols/fix40statestreet.jar:/opt/nyfix/abim/current/customprotocols/fix40statestreet-jtk.jar:/opt/nyfix/abim/cur
rent/customprotocols/fix41statestreet.jar:/opt/nyfix/abim/current/customprotocols/fix41statestreet-jtk.jar:/opt/nyfix/abim/current/customprotocols/fix42statestreet.jar:/opt/nyfix/abim/current/custo
mprotocols/fix42statestreet-jtk.jar -Xms4096M -Xmx4096M Route /opt/nyfix/abim1/current/config/appia FMPQA2-10014 DEBUG

I put the following as the $ARGS2$ -a '*Route /opt/nyfix/abim1/current/config/appia FMPQA2-10014 DEBUG"

That is the the end of the string.

I then hit Test Check Command and receive the following:

COMMAND: /usr/local/nagios/libexec/check_nrpe -H csappia22.qa.nyfix.net -t 30 -c check_services -a '\*Route /opt/nyfix/abim1/current/config/appia FMPQA2-10014 DEBUG\*'
OUTPUT: CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

I checked /var/log/messages on the remote server and there is no message or entry.

Re: Unable to get check_nrpe to find process on Linux server

Posted: Tue Apr 21, 2015 12:38 pm
by jolson
Please navigate to the server that you are trying to monitor, and run the 'check_procs' command locally. For example:

Code: Select all

/usr/local/nagios/libexec/check_procs -a "Route /opt/nyfix/abim1/current/config/appia FMPQA2-10014 DEBUG"
Let me know if this process works properly.

Re: Unable to get check_nrpe to find process on Linux server

Posted: Tue Apr 21, 2015 2:06 pm
by srg1970nj
Absolutely worked fine:

# /usr/local/nagios/libexec/check_procs -a "Route /opt/nyfix/abim1/current/config/appia FMPQA2-10014 DEBUG"
PROCS OK: 1 process with args 'Route /opt/nyfix/abim1/current/config/appia FMPQA2-10014 DEBUG' | procs=1;;;0;

So you pointed me in the right direction. In the Service Management, the $ARG1$ it was set to check_services. When I saw the above worked, I changed the $ARG1$ to check_procs. I saved the change and verified the process is now found.

I am all set. Thank you very much for your assistance!

Re: Unable to get check_nrpe to find process on Linux server

Posted: Tue Apr 21, 2015 2:17 pm
by jolson
I'm glad to hear that - I'll close this thread. If you need any further help or have any questions, feel free to open a new one. Thanks!