Page 1 of 1

Monitor ncpa_listener service on localhost

Posted: Wed Apr 03, 2019 4:45 pm
by jvaira
Hello,
I am trying to find a way to monitor the ncpa_listener service running on localhost. I saw the check_xi_service_status command but that only seems to apply to specific services.

Re: Monitor ncpa_listener service on localhost

Posted: Thu Apr 04, 2019 9:01 am
by lmiltchev
It seems like you are talking about a Nagios XI server on which you would like to monitor the ncpa_listener service, correct? You could use a command as this one:

Code: Select all

/usr/local/nagios/libexec/check_procs -C ncpa_listener -c 1:
If the ncpa_listener is not running, the check would exit with "2" exit code, and you will see an output as this one:

Code: Select all

PROCS CRITICAL: 0 processes with command name 'ncpa_listener' | procs=0;;1:;0;
If the service is running, the check would exit with "0" exit code, and you will see an output as this one:

Code: Select all

PROCS OK: 1 process with command name 'ncpa_listener' | procs=1;;1:;0;[/code

Re: Monitor ncpa_listener service on localhost

Posted: Thu Apr 04, 2019 11:10 am
by jvaira
That did the trick. Thank you

Re: Monitor ncpa_listener service on localhost

Posted: Thu Apr 04, 2019 11:23 am
by lmiltchev
I am glad I could help! :)