check_disk confused by negative disk space, fix or workaround?

Thomas Guyot-Sionnest dermoth at aei.ca
Sat Aug 25 20:00:04 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25/08/07 11:33 AM, Kelly Jones wrote:
> Nagios' check_disk plug-in gets confused when "df -k" reports negative
> space remaining on a drive. For example, if df -k says:
> 
> /dev/ccd0 567673758 524004492 -1744634 100% /partname
> 
> nagios' check_disk says:
> 
> DISK OK - free space: /partname 17592186042712 MB (-1% inode=97%)
> 
> Is there a workaround here? Can check_disk be told to throw an error
> if the remaining space *exceeds* a certain number? Can I tell it "if
> you see more than 1 terabyte available, something is wrong [because
> the machine in question doesn't have that much disk space], so report
> an error"?
> 
> (Unix, of course, reserves space for the root user, so negative space
> remaining just means all the user space has been used up + then some)

What system are you using? My df command never returns negative values
so I couldn't make a simple test case...

This is likely a matter of using signed integers and/or checking
properly the value. No need for a maximum value.

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG0G4k6dZ+Kt5BchYRArjzAKCKisP/IctHT2RcrYX9wM1dr0dAZgCg0GD+
sAIntzj3Qdk2e6K7FTcwEy8=
=3UkZ
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list