ncpa - check multiple services, disk in one command?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pkarr
Posts: 58
Joined: Fri Oct 05, 2012 1:01 pm

ncpa - check multiple services, disk in one command?

Post 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]
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
pkarr
Posts: 58
Joined: Fri Oct 05, 2012 1:01 pm

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

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
pkarr
Posts: 58
Joined: Fri Oct 05, 2012 1:01 pm

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

Post by pkarr »

Fantastic, I will download it and give it a spin!

thanks!
Penny
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post by slansing »

Great! Let us know how it goes.
Locked