check_afsspace

(Monitor AFS disk space usage under Nagios)

SYNOPSIS

check_afsspace [-hV] [-c threshold] [-w threshold] [-t timeout] -H host

DESCRIPTION

check_afsspace is a Nagios plugin for checking free space on AFS server partitions. It uses vos partinfo to obtain the free space on the partitions on an AFS server and will return an alert if the percentage of used space exceeds a threshold. By default, it returns a critical error if the used space is over 90% and a warning if it is over 85% (changable with the -c and -w options).

check_afsspace will always print out a single line of output, giving the critical errors if any, otherwise giving the warnings if any, otherwise listing in an abbreviated form the percentage free space for all partitions.

OPTIONS

-c threshold, --critical=threshold

Change the critical percentage threshold to threshold, which should be an integer percentage. The default is 90.

-H host, --hostname=host

The AFS file server whose free space check_afsspace should check. This option is required.

-h, --help

Print out this documentation (which is done simply by feeding the script to perldoc -t).

-t timeout, --timeout=timeout

Change the timeout for the vos partinfo command. The default timeout is 10 seconds.

-V, --version

Print out the version of check_afsspace and quit.

-w threshold, --warning=threshold

Change the warning percentage threshold to threshold, which should be an integer percentage. The default is 85.

EXIT STATUS

check_afsspace follows the standard Nagios exit status requirements. This means that it will exit with status 0 if there are no problems, with status 2 if there is at least one critical partition for that server, and with status 1 if there are no critical partitions but at least one warning partition. For other errors, such as invalid syntax, check_afsspace will exit with status 3.

BUGS

The standard -v verbose Nagios plugin option is not supported and should be. (For example, under -vv we would want to show the actual total, free, and used byte counts, not just the percentages.)

The usage message for invalid options and for the -h option doesn't conform to Nagios standards.

CAVEATS

This script does not use the Nagios util library or any of the defaults that it provides, which makes it somewhat deficient as a Nagios plugin. This is intentional, though, since this script can be used with other monitoring systems as well. It's not clear what a good solution to this would be.

SEE ALSO

vos(1)

The current version of this and other AFS monitoring plugins for Nagios are available from the AFS monitoring tools page at <http://www.eyrie.org/~eagle/software/afs-monitor/>.

AUTHORS

Originally written by Susan Feng for use with mon. Updated by Quanah Gibson-Mount to work with Nagios, and then further updated by Russ Allbery <rra@stanford.edu> to support more standard options and to use a more uniform coding style.

COPYRIGHT AND LICENSE

Copyright 2003, 2004 Board of Trustees, Leland Stanford Jr. University.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Last spun 2007-09-19 from POD modified 2006-09-22