How to filter check output
Posted: Wed Feb 01, 2012 5:46 am
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
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