< check_afs_bos | Russ Allbery > Software > Orphaned Software > afs-monitor | check_afs_rxdebug > |
(Monitor AFS quota usage under Nagios)
check_afs_quotas [-hV] [-c threshold] [-w threshold] [-t timeout] (-H host [-p partition] | -n volume) [-r regex]
check_afs_quotas is a Nagios plugin for checking free space in AFS
volumes based on the allocated quota for the volume. It uses either vos
examine
or vos listvol
to obtain the quota and current usage for
either a single volume or all volumes on a server or server partition and
will return an alert if the percentage of quota used is over a threshold.
By default, it returns a critical error if the used quota is over 90% and
a warning if it is over 85% (changeable with the -c and -w options).
To check a single volume, specify the volume name with -n. To check a whole server, specify the server name with -H. You can check only a single partition on a server by using the -p option to name the partition in combination with -H. When checking an entire server, the volumes checked can be filtered by using a regular expression (-r).
If vos examine
or vos listvol
doesn't return within the timeout,
check_afs_quotas will return a critical error. The default timeout is
300 seconds, changeable with the -t option.
check_afs_quotas will always print out a single line of output, giving the critical errors if any, otherwise giving the warnings if any, otherwise either summarizing the volume usage (if -n was given) or the total number of volumes checked.
Change the critical percentage threshold to threshold, which should be an integer percentage. The default is 90.
The AFS file server whose volumes to check for quota usage. Either this option or the -n option is required.
Print out this documentation (which is done simply by feeding the script
to perldoc -t
).
Check quota usage for a specific volume. Either this option or the -H option is required.
Used in combination with the -H option, limits quota checking to a
particular partition. The partition can be given in any of the forms
recognized by the AFS tools (so both the partition letter a
and the
full partition name /vicepa
will work).
When processing an entire server (-H), ignore any volumes that don't match the specified Perl regular expression.
Change the timeout for the vos partinfo
command. The default timeout
is 300 seconds.
Print out the version of check_afs_quotas and quit.
Change the warning percentage threshold to threshold, which should be an integer percentage. The default is 85.
check_afs_quotas 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_quotas will exit with status 3.
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.
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.
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/>.
Written by Russ Allbery based on a similar script by Steve Rader.
Copyright 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.
< check_afs_bos | Russ Allbery > Software > Orphaned Software > afs-monitor | check_afs_rxdebug > |