Page 1 of 1

NCPA 2.0.2 monitoring multiple windows services

Posted: Wed May 24, 2017 5:45 pm
by da1701d
Hello,

I am trying to use one check command to monitor multiple windows services. Here is the command I am using:

check_ncpa.py -H <hostname> -t '<apikey>' -M 'services' -q 'service=SERVICE1,service=SERVICE2,service=SERVICE3,service=SERVICE4,status=running'

...this only returns the status of last service in the list above...

OK: SERVICE4 is running

This behaves this way from both the command line of the nagios server and in the service management UI when you click "Run check command". When you login directly into the clients API interface it work correctly. Has anyone else encountered this? Is there a problem with the syntax of my check command?

Thanks in advance,

Dan

Re: NCPA 2.0.2 monitoring multiple windows services

Posted: Thu May 25, 2017 1:28 pm
by tgriep
If you run the plugin in verbose mode, you will see the API call that is generated by the plugin, only checks the last service in the query and not all of them.
I would assume that the plugin is not setup to query multiple services at once.

Re: NCPA 2.0.2 monitoring multiple windows services

Posted: Thu May 25, 2017 1:35 pm
by da1701d
Thanks a lot. I just found someone else who posted this as a known bug with the older version of the check_ncpa.py plugin. I guess its fixed in the newer 1.1.1 version. I was running the older 1.0.2 version.

https://support.nagios.com/forum/viewto ... ce#p220240

I already checked out the code for this newer version and tested it and it returns the correct status for multiple service checks.

-Dan

Re: NCPA 2.0.2 monitoring multiple windows services

Posted: Thu May 25, 2017 2:02 pm
by tgriep
Here I thought I was running the latest version and I wasn't, silly me.
Thanks for posting back your findings.