Page 1 of 1

NRPE CheckDriveSize not outputting usage percentage

Posted: Wed Jul 17, 2019 1:42 pm
by rferebee
Hello,

I created several checks to monitor mount points on Windows servers, but the status doesn't show the percentage currently being used. It only states, "OK All 1 drive(s) are ok".

Is there a way to get it to show what current usage percentage is as part of the status?

Here's the full command I'm using:

/usr/local/nagios/libexec/check_nrpe -2 -H xx.xx.xx.xx -t 30 -c CheckDriveSize -a 'c:\Mount\DB01' MaxWarn=85% MaxCrit=90%

And here's the output I'm getting in the GUI:

OK All 1 drive(s) are ok

Here's the output that shows in the CLI, so I know the information is there to serve up:

OK All 1 drive(s) are ok|'c:\Mount\DB01 used'=196.87335GB;509.9975;539.99736;0;599.99706 'c:\Mount\DB01 used %'=33%;85;90;0;100

Thank you!

Re: NRPE CheckDriveSize not outputting usage percentage

Posted: Thu Jul 18, 2019 3:42 pm
by cdienger
CheckDriveSize doesn't appear to have an option to change the format, but check_drivesize does. See https://support.nagios.com/kb/article/d ... s-770.html for examples including:

Code: Select all

./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=free<20%' 'critical=free<10%' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free_pct}% free / ${size} total}' top-syntax='${status}: ${problem_list}'

Re: NRPE CheckDriveSize not outputting usage percentage

Posted: Thu Jul 18, 2019 4:05 pm
by rferebee
Perfect! This works, thank you!

Re: NRPE CheckDriveSize not outputting usage percentage

Posted: Thu Jul 18, 2019 4:55 pm
by mbellerue
Excellent, glad to hear everything is working!