NCPA Plugin process filtering

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nagiosEngie
Posts: 104
Joined: Thu May 03, 2018 7:57 am

NCPA Plugin process filtering

Post 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
Last edited by nagiosEngie on Thu Jun 14, 2018 8:14 am, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Plugin process filtering

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagiosEngie
Posts: 104
Joined: Thu May 03, 2018 7:57 am

Re: NCPA Plugin process filtering

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA Plugin process filtering

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked