How to filter check output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
fao
Posts: 99
Joined: Thu Feb 03, 2011 3:05 am

How to filter check output

Post by fao »

Hi,
We are using CheckDriveSize command through check_nrpe to query the available disk space on local drives of Windows servers. This returns a very long output (see below) and we need to read all the line to discover which specific disk triggered the alert. Is there an option to limit the output only to that disk where the error is?
Thanks.


CRITICAL: C:\: 10.5G, D:\: 14G, E:\: 40.2G, F:\: 21.5G, G:\: 58G, H:\: Total: 104G - Used: 104G (100%) - Free: 0B (0%) < critical, I:\: 35.7G, J:\: 22G, K:\: Total: 104G - Used: 104G (100%) - Free: 0B (0%) < critical, L:\: 61.8G, M:\: 88.8G, N:\: 27.8G
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to filter check output

Post by scottwilkerson »

By default the NSClient++ CheckDriveSize checks all drives in one check, but it doesn't have to be this way.

The NSClient++ CheckDriveSize command has options you can change, if you add the Drive parameter you can make a check for each drive
The documentation is here
http://nsclient.org/nscp/wiki/CheckDriveSize
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
fao
Posts: 99
Joined: Thu Feb 03, 2011 3:05 am

Re: How to filter check output

Post by fao »

Thanks, but I don't want to configure a service scheck for each disk separately and this will be additional work since all the servers don't have the same number of drives.
I will be happy if something like "--errors-only" can exist like with the check_disk command to return only the culprit.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to filter check output

Post by lmiltchev »

I am not sure if this could be done... it has to be done on the client site and maybe the NSClient++ support forum is a good place to start with.

http://www.nsclient.org/nscp/
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked