In the examples given:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip> -p 5666 -c CheckDriveSize -a ShowAll Drive=D MinWarnFree=2G MinCritFree=1G
Code: Select all
[jdalrymple@localhost libexec]$ ./check_nrpe -H <winhost> -c check_drivesize -a "warn=free<8G" "crit=free<3G" "drive=c:"
OK All 1 drive(s) are ok|'c: free'=8.94279GB;8;3;0;107.46972 'c: free %'=8%;7;2;0;100
[jdalrymple@localhost libexec]$ ./check_nrpe -H <winhost> -c check_drivesize -a "warn=free<10G" "crit=free<3G" "drive=c:"
WARNING c:: 98.527GB/107.47GB used|'c: free'=8.94279GB;10;3;0;107.46972 'c: free %'=8%;9;2;0;100
Is there a way to show ALL disks instead of specify a Drive=? I try using ShowAll and get No Drives found.
./check_nrpe -H <host> -t 30 -c CheckDriveSize -a "Warn=free<4G" "Crit=free<2G" ShowAll FilterType=Fixed
So I tried this and the output doesn't seem right.
./check_nrpe -H <host> -t 30 -c CheckDriveSize -a ShowAll MinWarn=4G MinCrit=2G FilterType=Fixed CheckAll
CRITICAL critical(: Total: 99.996MB - Used: 30.75MB (31%) - Free: 69.246MB (69%)), C:\: Total: 29.9GB - Used: 24.655GB (83%) - Free: 5.245GB (17%), D:\: Total: 14.997GB - Used: 8.512GB (57%) - Free: 6.485GB (43%)|'C:\ free'=5.24547GB;4;2;0;29.90038 'C:\ free %'=17%;13;6;0;100 'D:\ free'=6.48526GB;4;2;0;14.99706 'D:\ free %'=43%;26;13;0;100 '\\?\Volume{bc5e05ee-a120-11e2-9576-806e6f6e6963}\ free'=69.24609MB;4096;2048;0;99.99609 '\\?\Volume{bc5e05ee-a120-11e2-9576-806e6f6e6963}\ free %'=69%;4096;2048;0;100
The drives have more than 2G free so why would it show CRITICAL?
I also tried this thinking it would reflect "free" space but same result.
./check_nrpe -H <host> -t 30 -c CheckDriveSize -a ShowAll MinWarnFree=4G MinCritFree=2G FilterType=Fixed CheckAll
CRITICAL critical(: Total: 99.996MB - Used: 30.75MB (31%) - Free: 69.246MB (69%)), C:\: Total: 29.9GB - Used: 24.655GB (83%) - Free: 5.245GB (17%), D:\: Total: 14.997GB - Used: 8.512GB (57%) - Free: 6.485GB (43%)|'C:\ free'=5.24547GB;4;2;0;29.90038 'C:\ free %'=17%;13;6;0;100 'D:\ free'=6.48526GB;4;2;0;14.99706 'D:\ free %'=43%;26;13;0;100 '\\?\Volume{bc5e05ee-a120-11e2-9576-806e6f6e6963}\ free'=69.24609MB;4096;2048;0;99.99609 '\\?\Volume{bc5e05ee-a120-11e2-9576-806e6f6e6963}\ free %'=69%;4096;2048;0;100