check_afs_space

(Monitor AFS disk space usage under Nagios)

SYNOPSIS

check_afs_space [-dhV] [-c threshold] [-w threshold] [-p partition] [-t timeout] -H host

DESCRIPTION

check_afs_space 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% (changeable with the -c and -w options).

If vos partinfo doesn't return within the timeout, check_afs_space will return a critical error. The default timeout is 300 seconds, changeable with the -t option.

check_afs_space 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.

The check can be limited to a single partition by specifying that partition with the -p option. In this case, more verbose information about the total, used, and free space is given in the one line of output.

OPTIONS

-c threshold, --critical=threshold

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

-d, --perfdata

Include performance data in the plugin output. This adds an additional section of the output following a vertical bar (|) following the Nagios plugin standard for performance data. There will be one variable for each partition checked, named partition_percent, where partition is the partition without the leading slash. The value will be the usage percentage.

-H host, --hostname=host

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

-h, --help

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

-p partition, --partition=partition

Limit the results to the specified partition. The partition can be given as the partition letter (a, for example) or the full partition name (/vicepa), with or without the leading slash. If this option is given, only that partition will be checked and more verbose information about total, used, and free space will be printed.

-t timeout, --timeout=timeout

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

-V, --version

Print out the version of check_afs_space 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_afs_space 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_afs_space 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)

This script is part of the afs-monitor package, which includes various AFS monitoring plugins for Nagios. It is 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 <eagle@eyrie.org> to support more standard options and to use a more uniform coding style. Support for checking a single partition based on work by Steve Rader.

COPYRIGHT AND LICENSE

Copyright 2003, 2004, 2010, 2013 The Board of Trustees of the Leland Stanford Junior University

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

Last spun 2014-08-10 from POD modified 2014-04-14