File System

Check free disk space with snmp

Description:

with this simple nagios plugin you can check the free space of every harddisk. You can also pass parameters for warning and critical, when the percentage of the used space goes higher than your supplied levels

Current Version

Last Release Date

June 15, 2009

Compatible With


Project Files
Project Notes
Add something like command[check_hd]=/usr/lib/nagios/plugins/check_hd $HOSTADDRESS$ public $ARG1$ $ARG2$ $ARG3$ to your command.cfg also add something like define command{ command_name check_hd command_line $USER1$/check_hd $HOSTADDRESS$ public $ARG1$ $ARG2$ $ARG3$ } to your checkcommands.cfg by using the lines define service{ use generic-service host_name YOURHOST service_description SERVICENAME is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 60 retry_check_interval 1 contact_groups admins notification_interval 240 notification_period 24x7 notification_options c,r check_command check_hd!40!60!C } you can activate checks for disc C on YOURHOST. You will receive warnings, if percentage of used space reaches 40 perc. and you will receive a critical fail if percentage of used discspace reaches 60 perc.
Reviews (1) Add a Review
some Modifications
by nikonier, July 31, 2013

Hi, after installing the plugin I got an error: (Service check did not exit properly) after some "googling" I modified my entry in the commands.cfg: command_line /usr/bin/perl $USER1$/check_hd $HOSTADDRESS$ public $ARG1$ $ARG2$ $ARG3$ everything works, but I don't like the output: OK: hd C in use 5.19659161907092 perc and 529.744556427002 GB free w-40 c-60 so I did some more modifications. edit the plugin check_hd: around Line 72: $freespace=$fullsize1 - $usedsize1; $freespace=$freespace / 1024 / 1024 / 1024; $freespace = sprintf("%.2f", $freespace); $percfilled=$usedsize1 * 100 / $fullsize1; $percfilled = sprintf("%.2f", $percfilled); ADD the commands with the sprintf command. output now: OK: hd C in use 5.20 perc and 529.74 GB free w-40 c-60 regards, Juergen



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (1)
Favorites
0
Views
140,877