Page 1 of 1

NCPA Plugin process filtering

Posted: Mon May 21, 2018 10:11 am
by nagiosEngie
Hello Nagios Crew,
I am having some issues in finding a way to monitor jboss processes.

My process name is /bin/sh /opt/jboss-4.2.3.GA/bin/run.sh -c <someting> -b 0.0.0.0

The only command I am having success with is:
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.144.118 -t 'token123' -P 5693 -M 'processes' -q 'name=run.sh' -c1:

I have not found a way to tie the run.sh to the >someting> string.

I tied:
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.144.118 -t 'token123' -P 5693 -M 'processes' -q 'name=run.sh,combiner=and,match=<something>,check=true' -c1:
But it appears to just get the process run.sh ignoring the rest.

Can you give me any sugetions on how to do this and if there is a reference with examples?

Thankyou
Sandro

Re: NCPA Plugin process filtering

Posted: Mon May 21, 2018 12:39 pm
by lmiltchev
The syntax looks correct. What is the version of the NCPA agent that you are currently using?

Can you give us an example of the "something string"? Any special characters in it?

Also, can you show us what you see in the web UI (API) when you use the "name=run.sh" search only?

Re: NCPA Plugin process filtering

Posted: Fri May 25, 2018 7:48 am
by nagiosEngie
Hi I resolved the mater using the "cmd" string:

-P 5693 -M 'processes' -q 'cmd=/bin/sh /opt/jboss-4.2.3.GA/bin/run.sh -c <someting> -b 192.168.144.88' -c1:

You must insert the exact string user for starting the process.

Thanks

SAndro

Re: NCPA Plugin process filtering

Posted: Fri May 25, 2018 9:00 am
by lmiltchev
I am glad your issue has been resolved! I will be locking this topic now. If you have any more questions/issues, please start a new thread.