check_bos

(Monitor AFS bos output for problems in Nagios)

SYNOPSIS

check_bos [-hV] [-t timeout] -H host

DESCRIPTION

check_bos is a Nagios plugin for querying the AFS bosserver for process status and reporting an alert if there are any unexpected lines in the bos output. The acceptable lines of output from bos are configured at the top of this script; they should be generally suitable for most sites, but may require some customization.

check_bos will always print out a single line of output. If there is a line that isn't matched by any regexes identifying acceptable lines, it will output the first non-matching line prefixed by BOS CRITICAL. Otherwise, it will output BOS OK. Note that this monitoring may not catch such things as a service being constantly restarted if it happens to be up and running normally each time the probe runs; it doesn't pay any attention to the last start time, the last error exit status, the presence of core files, and the like. It mostly just looks for the "running normally" part of the bos output and makes sure the auxilliary status is also "running normally" for a file server process.

OPTIONS

-H host, --hostname=host

The AFS server whose bos status check_bos 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 bos command. The default timeout is 10 seconds.

-V, --version

Print out the version of check_bos and quit.

EXIT STATUS

check_bos follows the standard Nagios exit status requirements. This means that it will exit with status 0 if there are no problems or with status 2 if there is a problem detected. For other errors, such as invalid syntax, check_bos will exit with status 3.

BUGS

The standard -v verbose Nagios plugin option is not supported. It should display the complete bos status output.

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

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

The original idea behind this script was from Neil Crellin. Russ Allbery <rra@stanford.edu> updated it to work with Nagios and stripped out some rather neat but now unnecessary code to look for any changes in the bos output, instead just scanning it for acceptable lines.

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