Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
This is an updated and modified version of check free disk space (https://exchange.nagios.org/directory/Plugins/Operating-Systems/Windows-NRPE/Check-free-disk-space/details)
Modified by Corey Davis April 8, 2021 ‘ Added disclaimer for using an undefined /d: for an argument to the help display ‘ Added ALL scope to parameter /d to tell it to use ALL disks on the system ‘ Removed the error catch-all for undefined drives or no drives on the system ‘ Fixed DriveSeleted function logically and added the ALL flag ‘ Moved the case assignments to inside the loop so it can build the correct responses for all specified drives ‘ Fixed formatting outdrive output to make it more readable ‘ Changed errorStatus to use the highest error code for the global script output so that Nagios will show the correct status, OK, WARNING, CRITICAL ‘
Current Version
Last Release Date
2021-04-08
Owner
Corey Davis
Compatible With
check_disk script
This is an updated and modified version of check free disk space (https://exchange.nagios.org/directory/Plugins/Operating-Systems/Windows-NRPE/Check-free-disk-space/details) I would like to submit this to the original author, but I created this instead. Check free space on windows partitions. It tries to resemble as much as possible with check_disk from the Official Nagios Plugin package. ** Modified Barry W. Alder 2013/09/24 changed code so that an error is reported if no disks are found with the /x flag and an error is reported if the disk specified in the /d flag is not found It checks all partitions, a list or all but an exclusion list. Limits can be in % or in standard units (B | kB | MB | GB) Results are displayed in standard Nagios format. nrpe.cfg config file declaration: command[check_disk]=c:Windowssystem32cscript.exe //NoLogo //T:10 c:adminnrpecheck_disk.vbs /w:$ARG1$ /c:$ARG2$ /p /d:$ARG3$ /x:$ARG4$ /u:GB Connand line syntax: cscript //Nologo check_disk.vbs /w:INTEGER /c:INTEGER [/p] [/d:DRIVE_LIST | /x:DRIVE_LIST] [/u:UNITS] [/h] /w: warning limit /c: critical limit /p: limits in %, otherwise in UNITS /d: included drives list /x: excluded drives list /u: B | kB | MB | GB, default MB /h: this help "!!!!!You MUST specify a drive list or ALL for the /d parameter. If not the script will give no output!!!!!" check_disk.vbs /w:15 /c:5 /p /d:CDE /u:kB - result will be displayed in kB, limits are in percents check_disk.vbs /w:500 /c:250 /d:ALL - result will be displayed in MB, limits are in MB, all fixed drives check_disk.vbs /w:500 /c:250 - result will be displayed in MB, limits are in MB, all fixed drives Modified by Corey Davis April 8, 2021 ' Added disclaimer for using an undefined /d: for an argument to the help display ' Added ALL scope to parameter /d to tell it to use ALL disks on the system ' Removed the error catch-all for undefined drives or no drives on the system ' Fixed DriveSeleted function logically and added the ALL flag ' Moved the case assignments to inside the loop so it can build the correct responses for all specified drives ' Fixed formatting outdrive output to make it more readable ' Changed errorStatus to use the highest error code for the global script output so that Nagios will show the correct status, OK, WARNING, CRITICAL
You must be logged in to submit a review.
To:
From: