Linux

check_disc_usage

Description:

No longer maintained. Do it with SNMP using the pathced version from the Manubulon plugins.
https://github.com/dnsmichi/manubulon-snmp
By Martin Fuerstenau

Current Version

Last Release Date

June 16, 2009

Compatible With


Project Notes
The problem: Monitor discusage on all Unix/Linux-Maschines Unfortunately on some older maschines (Reliant Unix) there was no net-snmp and the standard SNMP supported only the standard network features. Using ssh for monitoring was no option due to security issues and some legal issues like SOX (Sarbanes Oxley Act). Solution: Running df -kl as a service through inetd or xinetd. You need netcat as a tool First you have to add a line like diskusage stream tcp nowait root /bin/df df -kl to inetd.conf. For xinetd you have to add a file to the config-directory (/etc/xinetd.d) containing the following: service diskusage { socket_type = stream protocol = tcp wait = no user = root server = /bin/df server_args = -kl } Usually I name the file diskusage. Next you have to assign a port in /etc/services as well as on the monitored server as on the monitor host. I call the port diskusage, but the name and the port number are not mandatory. /etc/services: diskusage 59990/tcp If you type in "netcat hostname diskusage" on a shell prompt you should get the output of the df -kl. If it will not work check firewall settings and so on. This script takes the output and does the rest. But beware. The "percentage used" of the output will differ from the real usage. the an amount of space reserved for root and/or as a security. This amount differs from system to system (Linux, Solaris...). Why do I mention that? On some systems like Reliant Unix you can see more than 100 % used. On other systems in some special situations 100% will not be a problem (i.e. Oracle tablespaces). Thereforethis script looks for the usage displayed. If it is greater or equal 100% the real usage will be calculated and displayed as output together with the one displayed by df -kl.
Reviews (1) Add a Review
Review
by euqnoj, June 30, 2011

As was said you will need "netcat" that isn't part of the base build and if you install from source you will need to modify the script with the location of netcat. All else is fat, dumb and happy. Works like a charm and you can modify the output message to fit your needs. Great work man!



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
5 (1)
Favorites
0
Views
147,897