NCPA Plugin process filtering with regualr expressions
Posted: Wed Jun 20, 2018 8:45 am
Hello Nagios Crew,
Is it possible to search for processes (with NCPA plugin) on linux server using regular expressions like:
.*svr worker.*PIPPO_PLUTO.*
EX:
./check_ncpa.py -H 10.211.145.47 -t 'TOKEN' -P 5693 -M 'processes' -q 'cmd=.*svr worker.*PIPPO_PLUTO.*'
The processes I am trying to capture have commas in the name, so I cannot use the "cmd=" option (which expects the whole command Line launched by the process) because in html commas are special characters so when the script generates the URL for the API request I will get an error.
The only option I can come up with is to use regular expressions.
Can you please help?
Thanks
Sandro
Is it possible to search for processes (with NCPA plugin) on linux server using regular expressions like:
.*svr worker.*PIPPO_PLUTO.*
EX:
./check_ncpa.py -H 10.211.145.47 -t 'TOKEN' -P 5693 -M 'processes' -q 'cmd=.*svr worker.*PIPPO_PLUTO.*'
The processes I am trying to capture have commas in the name, so I cannot use the "cmd=" option (which expects the whole command Line launched by the process) because in html commas are special characters so when the script generates the URL for the API request I will get an error.
The only option I can come up with is to use regular expressions.
Can you please help?
Thanks
Sandro