NCPA - Actively monitor multiple windows services

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
safurniss1
Posts: 2
Joined: Wed Sep 17, 2014 8:10 am

NCPA - Actively monitor multiple windows services

Post by safurniss1 »

I am wanting to move away from using our current agent (NSClient++) and think that NCPA looks like what I should move to. I am im the process of testing that NCPA will do all that I need, however i am not sure of the syntax to use when making active checks from the Nagios server (Nagios Core 4.0.8) to the NCPA agent on the Windows box for some of my checks.

I can get output for checking CPU, Memory and Disk, and can check a single service..... however the issue is how do I check multiple services in one check command?

I have looked through the documentation and it's not that clear as to what I need to input (not a lot of command line examples).

Here is what I have working:-

./check_ncpa.py -H <SOMESERVER> -M services/BITS/running -t <MY_TOKEN>

How do I get it to do multiple services?

Regards

Steve
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA - Actively monitor multiple windows services

Post by lmiltchev »

I haven't been able to check multiple services with one command with NCPA. I am not sure if it is even possible. There is nothing in the documentation that covers this scenario. I will talk to the NCPA developer to get more info on that.
Be sure to check out our Knowledgebase for helpful articles and solutions!
safurniss1
Posts: 2
Joined: Wed Sep 17, 2014 8:10 am

Re: NCPA - Actively monitor multiple windows services

Post by safurniss1 »

Hi lmiltchev... thanks for your reply.....

I currently run several checks with version 3.9 of NSClient++ for checking services... here is an example of my current checks:-

./check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckServiceState -a MSExchangeADTopology MSExchangeAntispamUpdate MSExchangeEdgeSync MSExchangeFDS MSExchangeServiceHost MSExchangeTransport MSExchangeTransportLogSearch ShowAll

I want to be able to migrate accross to NCPA and do the same kind of checks.... I was hoping that it is possible as it mentions in the api documents that you can although I have been unable to get it to work
This will filter the list of services down to the service specified, sshd by using the service paramter. The output also shows it’s current status (running or stopped). You can also filter by multiple services by adding multipe parameters to the request. If we would have done service=sshd&service=auditd we would have got two services back. You can also filter by status using the status parameter.


I am also wanting to do a similar thing with memory....

My current check for memory is:-

./check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=75% MaxCrit=90% ShowAll=long type=physical

the output that I get is :-

Status Information: OK: physical memory: Total: 3.99G - Used: 1.28G (32%) - Free: 2.71G (68%)
Performance Data: 'physical memory %'=32%;75;90 'physical memory'=1.28GB;2.99;3.59;0;3.99

which gives me two graphs in PNP4Nagios... one for % used and the other for GB used.

Using NCPA I can only get one of these per check and would have to use two check commands:-

./check_ncpa.py -H <SOMESERVER> -M memory/virtual/percent -t <MY_TOKEN> -w 75 -c 90
./check_ncpa.py -H <SOMESERVER> -M memory/virtual/used -t <MY_TOKEN>

which would return:-

OK: percent was 26% | 'percent_0'=26%;75;90;
OK: used was 2221047808b | 'used_0'=2221047808b;;;

I suspect that I'm going to have the same issue with checking CPU and Disk..

Regards

Steve
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA - Actively monitor multiple windows services

Post by lmiltchev »

Checking multiple services with NCPA *should* work but it's not working at the moment. I believe this is a bug, so I posted a bug report here:

https://github.com/NagiosEnterprises/ncpa/issues/70

I don't think checking memory will work the same way as with NSClient++. Most probably you will need to use two separate checks.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked