Page 1 of 1

ncpa - check multiple services, disk in one command?

Posted: Wed Nov 05, 2014 1:00 pm
by pkarr
We are evaluating NCPA 1.7.2 as a replacement for NSClient++, v 0.3.9.

There are a some handy features from check_nt/check_nrpe that
we'd like to implement in ncpa that I'm not finding in the ncpa docs.

- We'd like to check for multiple services in a single check?
Here's a sample of the check_nt command we'd like to convert to ncpa.

/usr/local/nagios/libexec/check_nt -H <HostAddress> -t 30 -s "TOKEN" -p 12489
-v SERVICESTATE -l IMAService,cpsvc,"Citrix SMA Service",CtxHttp,Spooler,RpcSs,Netlogon -d SHOWFAIL

- Similarly, checks all disks in a single check?
Here's the command:
/usr/local/nagios/libexec/check_nrpe -H <HostAddress> -t 30 -c CheckDriveSize -a ShowFail MaxWarn=95% MaxCrit=98%

Any ideas?

thanks,
Penny

Penny Karr | IT Infrastructure Monitoring
Harvard Vanguard Medical Associates, an Affiliate of Atrius Health
254 Second Avenue | Needham, MA 02494
P (781) 292-1853 | F (781 292-1980 | http://www.harvardvanguard.org
Email: [email protected]

Re: ncpa - check multiple services, disk in one command?

Posted: Wed Nov 05, 2014 4:22 pm
by sreinhardt
I don't believe this is possible yet, but both seem like great suggestions! Looking over the ncpa github, I don't see any similar requests. I can certainly create a bug and link to this page if you would like, if you have a github account, posting the issue yourself might give a better description for the developers. Whichever route you would like to take, these should be feature requests(posted as issues) on github, and I think they will definitely be added!

https://github.com/nagiosenterprises/ncpa/issues

Re: ncpa - check multiple services, disk in one command?

Posted: Thu Nov 06, 2014 11:02 am
by pkarr
Hi Spenser,
I'd appreciate it if you would file the bug/enhancement report with Github.
I created a login account but can't figure out how to create a bug report.
A pull request perhaps?

thanks,
Penny

Re: ncpa - check multiple services, disk in one command?

Posted: Thu Nov 06, 2014 11:14 am
by lmiltchev
Actually, this is already "in the works"... With the new version of the "check_ncpa.py" plugin, you should be able to pass a "-q" flag and query multiple services, for example:

Code: Select all

./check_ncpa.py -H 192.168.x.x -t token -M 'service' -q 'service=Spooler,service=FDResPub,service=EFS,status=running'
I don't think is is working very well at the moment - I found some bugs with it, but it is work in progress. The new plugin could be downloaded/tested from here:

https://raw.githubusercontent.com/Nagio ... ck_ncpa.py

Re: ncpa - check multiple services, disk in one command?

Posted: Thu Nov 06, 2014 2:26 pm
by pkarr
Fantastic, I will download it and give it a spin!

thanks!
Penny

Re: ncpa - check multiple services, disk in one command?

Posted: Thu Nov 06, 2014 3:12 pm
by slansing
Great! Let us know how it goes.