(Monitor AFS bos output for problems in Nagios)


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


check_afs_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_afs_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. If the salvager is running (such as when started by bos salvage) or other warnings are found, it will print that warning information prefixed by BOS WARNING. 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 auxiliary status is also "running normally" for a file server process.


-H host, --hostname=host

The AFS server whose bos status check_afs_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_afs_bos and quit.


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


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.


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.


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


The original idea behind this script was from Neil Crellin. Russ Allbery <> 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 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