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
How to filter check output
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to filter check output
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
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
Re: How to filter check output
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.
I will be happy if something like "--errors-only" can exist like with the check_disk command to return only the culprit.
Re: How to filter check output
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/
http://www.nsclient.org/nscp/
Be sure to check out our Knowledgebase for helpful articles and solutions!