From 4118cfe01fee9f54f989e0ba2881c529b69af731 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 15 Oct 2010 13:21:05 -0700 Subject: [PATCH] Update coding style, version method, documentation Update the coding style in a few places where my Perl style has changed and clean up the scripts a bit. Switch the versioning system from the CVS $Id$ tags to a variable that will be replaced during make dist (not yet in place). Proofread the documentation and update it as necessary. Refer to the new afs-monitor distribution, which these scripts will now be part of. --- check_afsspace | 100 +++++++++++++++++++++++++------------------------ check_bos | 75 ++++++++++++++++++------------------- check_rxdebug | 98 ++++++++++++++++++++++++------------------------ check_udebug | 86 +++++++++++++++++++++--------------------- 4 files changed, 180 insertions(+), 179 deletions(-) diff --git a/check_afsspace b/check_afsspace index 0e9fbce..60d82e9 100755 --- a/check_afsspace +++ b/check_afsspace @@ -1,17 +1,17 @@ #!/usr/bin/perl -w -# $ID = q$Id$; +our $VERSION = '@VERSION@ @DATE@'; # # check_afsspace -- Monitor AFS disk space usage under Nagios. # # Written by Susan Feng # Updated by Russ Allbery -# Copyright 2003, 2004 Board of Trustees, Leland Stanford Jr. University +# Copyright 2003, 2004, 2010 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. # -# Expects a host with the -H option and checks the partition usage with -# vos partinfo. Exits with status 1 if the free space is below a warning +# Expects a host with the -H option and checks the partition usage with vos +# partinfo. Exits with status 1 if the free space is below a warning # percentage and with status 2 if the free space is above a critical # percentage (this works with the Nagios check architecture). @@ -19,30 +19,29 @@ # Modules and declarations ############################################################################## -require 5.003; +require 5.006; use strict; -use vars qw($CRITICAL $ID $TIMEOUT $VOS $WARNINGS); use Getopt::Long qw(GetOptions); + ############################################################################## # Site configuration ############################################################################## # The default percentage full at which to warn and at which to send a critical # alert. These can be overridden with the -w and -c command-line options. -$WARNINGS = 85; -$CRITICAL = 90; +our $WARNINGS = 85; +our $CRITICAL = 90; # The default timeout in seconds (implemented by alarm) for vos partinfo. -$TIMEOUT = 300; +our $TIMEOUT = 300; # The full path to vos. Make sure that this is on local disk so that # monitoring doesn't have an AFS dependency. -($VOS) = grep { -x $_ } qw(/usr/bin/vos /usr/local/bin/vos); +our ($VOS) = grep { -x $_ } qw(/usr/bin/vos /usr/local/bin/vos); $VOS ||= '/usr/bin/vos'; - ############################################################################## # Implementation ############################################################################## @@ -50,21 +49,19 @@ $VOS ||= '/usr/bin/vos'; # Parse command line options. my ($help, $host, $version); Getopt::Long::config ('bundling', 'no_ignore_case'); -GetOptions ('critical|c=i' => \$CRITICAL, - 'hostname|H=s' => \$host, - 'help|h' => \$help, - 'timeout|t=i' => \$TIMEOUT, - 'version|V' => \$version, - 'warning|w=i' => \$WARNINGS) or exit 3; +GetOptions ('c|critical=i' => \$CRITICAL, + 'H|hostname=s' => \$host, + 'h|help' => \$help, + 't|timeout=i' => \$TIMEOUT, + 'V|version' => \$version, + 'w|warning=i' => \$WARNINGS) or exit 3; if ($help) { print "Feeding myself to perldoc, please wait....\n"; exec ('perldoc', '-t', $0) or die "Cannot fork: $!\n"; } elsif ($version) { - my $version = join (' ', (split (' ', $ID))[1..3]); - $version =~ s/,v\b//; + my $version = $VERSION; $version =~ s/(\S+)$/($1)/; - $version =~ tr%/%-%; - print $version, "\n"; + print "check_afsspace $version\n"; exit 0; } if (@ARGV) { @@ -125,21 +122,26 @@ check_afsspace - Monitor AFS disk space usage under Nagios =head1 SYNOPSIS -check_afsspace [B<-hV>] [B<-c> I] [B<-w> I] -[B<-t> I] B<-H> I +B [B<-hV>] [B<-c> I] [B<-w> I] + [B<-t> I] B<-H> I =head1 DESCRIPTION B is a Nagios plugin for checking free space on AFS server partitions. It uses C 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 B<-c> and B<-w> options). +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% (changaable +with the B<-c> and B<-w> options). + +If C doesn't return within the timeout, B +will return a critical error. The default timeout is 300 seconds, +changeable with the B<-t> option. -B 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. +B 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. =head1 OPTIONS @@ -147,8 +149,8 @@ listing in an abbreviated form the percentage free space for all partitions. =item B<-c> I, B<--critical>=I -Change the critical percentage threshold to I, which should be an -integer percentage. The default is 90. +Change the critical percentage threshold to I, which should be +an integer percentage. The default is 90. =item B<-H> I, B<--hostname>=I @@ -162,8 +164,8 @@ to C). =item B<-t> I, B<--timeout>=I -Change the timeout for the C command. The default timeout is -10 seconds. +Change the timeout for the C command. The default timeout +is 300 seconds. =item B<-V>, B<--version> @@ -171,8 +173,8 @@ Print out the version of B and quit. =item B<-w> I, B<--warning>=I -Change the warning percentage threshold to I, which should be an -integer percentage. The default is 85. +Change the warning percentage threshold to I, which should be +an integer percentage. The default is 85. =back @@ -182,32 +184,33 @@ B 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, B will -exit with status 3. +partition. For other errors, such as invalid syntax, B +will exit with status 3. =head1 BUGS -The standard B<-v> verbose Nagios plugin option is not supported and should -be. (For example, under B<-vv> we would want to show the actual total, -free, and used byte counts, not just the percentages.) +The standard B<-v> verbose Nagios plugin option is not supported and +should be. (For example, under B<-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 B<-h> option doesn't conform to Nagios standards. =head1 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. +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. =head1 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 -L. +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 L. =head1 AUTHORS @@ -218,7 +221,8 @@ uniform coding style. =head1 COPYRIGHT AND LICENSE -Copyright 2003, 2004 Board of Trustees, Leland Stanford Jr. University. +Copyright 2003, 2004, 2010 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. diff --git a/check_bos b/check_bos index 428cd1b..6098e18 100755 --- a/check_bos +++ b/check_bos @@ -1,11 +1,11 @@ #!/usr/bin/perl -w -# $ID = q$Id$; +our $VERSION = '@VERSION@ @DATE@'; # # check_bos -- Monitor AFS bos output for problems in Nagios. # # Written by Russ Allbery # Based on an earlier script by Neil Crellin -# Copyright 2003, 2004 Board of Trustees, Leland Stanford Jr. University +# Copyright 2003, 2004, 2010 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. @@ -20,29 +20,29 @@ # Modules and declarations ############################################################################## -require 5.005; +require 5.006; use strict; -use vars qw($BOS $ID @OKAY $TIMEOUT); use Getopt::Long qw(GetOptions); + ############################################################################## # Site configuration ############################################################################## # The full path to bos. Make sure that this is on local disk so that # monitoring doesn't have an AFS dependency. -($BOS) = grep { -x $_ } qw(/usr/bin/bos /usr/local/bin/bos); +our ($BOS) = grep { -x $_ } qw(/usr/bin/bos /usr/local/bin/bos); $BOS ||= '/usr/bin/bos'; # The default timeout in seconds (implemented by alarm) for rxdebug. -$TIMEOUT = 10; +our $TIMEOUT = 10; # The list of regular expressions matching expected output. You may need to # customize this for what you're running at your site. Any output from bos # that doesn't match one of these regular expressions will throw a critical # error. -@OKAY = ( +our @OKAY = ( qr/^\s*$/, qr/^Instance\ \S+,\ \(type\ is\ \S+\)(\ has\ core\ file,)? \ currently\ running\ normally\.$/x, @@ -53,7 +53,6 @@ $TIMEOUT = 10; qr/^\s*Command \d+ is / ); - ############################################################################## # Implementation ############################################################################## @@ -61,19 +60,17 @@ $TIMEOUT = 10; # Parse command line options. my ($help, $host, $version); Getopt::Long::config ('bundling', 'no_ignore_case'); -GetOptions ('hostname|H=s' => \$host, - 'help|h' => \$help, - 'timeout|t=i' => \$TIMEOUT, - 'version|V' => \$version) or exit 3; +GetOptions ('H|hostname=s' => \$host, + 'h|help' => \$help, + 't|timeout=i' => \$TIMEOUT, + 'V|version' => \$version) or exit 3; if ($help) { print "Feeding myself to perldoc, please wait....\n"; exec ('perldoc', '-t', $0) or die "Cannot fork: $!\n"; } elsif ($version) { - my $version = join (' ', (split (' ', $ID))[1..3]); - $version =~ s/,v\b//; + my $version = $VERSION; $version =~ s/(\S+)$/($1)/; - $version =~ tr%/%-%; - print $version, "\n"; + print "check_bos $version\n"; exit 0; } if (@ARGV) { @@ -134,7 +131,7 @@ check_bos - Monitor AFS bos output for problems in Nagios =head1 SYNOPSIS -check_bos [B<-hV>] [B<-t> I] B<-H> I +B [B<-hV>] [B<-t> I] B<-H> I =head1 DESCRIPTION @@ -145,15 +142,15 @@ top of this script; they should be generally suitable for most sites, but may require some customization. B 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 C. Otherwise, -it will output B. 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 -B output and makes sure the auxilliary status is also "running -normally" for a file server process. +line that isn't matched by any regexes identifying acceptable lines, it +will output the first non-matching line prefixed by C. +Otherwise, it will output B. 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 B output and makes sure the auxilliary status +is also "running normally" for a file server process. =head1 OPTIONS @@ -184,29 +181,30 @@ Print out the version of B and quit. B 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, B will exit with status 3. +status 2 if there is a problem detected. For other errors, such as +invalid syntax, B will exit with status 3. =head1 BUGS -The standard B<-v> verbose Nagios plugin option is not supported. It should -display the complete bos status output. +The standard B<-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 B<-h> option doesn't conform to Nagios standards. =head1 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. +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. =head1 SEE ALSO -The current version of this and other AFS monitoring plugins for Nagios are -available from the AFS monitoring tools page at -L. +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 L. =head1 AUTHORS @@ -217,7 +215,8 @@ output, instead just scanning it for acceptable lines. =head1 COPYRIGHT AND LICENSE -Copyright 2003, 2004 Board of Trustees, Leland Stanford Jr. University. +Copyright 2003, 2004, 2010 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. diff --git a/check_rxdebug b/check_rxdebug index d09b4b2..295ac32 100755 --- a/check_rxdebug +++ b/check_rxdebug @@ -1,11 +1,12 @@ #!/usr/bin/perl -w -# $ID = q$Id$; +our $VERSION = '@VERSION@ @DATE@'; # # check_rxdebug -- Nagios AFS server check for waiting connections. # # Written by Quanah Gibson-Mount based on work by Neil Crellin # Updated by Russ Allbery -# Copyright 2003, 2004, 2005 Board of Trustees, Leland Stanford Jr. University +# Copyright 2003, 2004, 2005, 2010 +# 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. @@ -20,30 +21,29 @@ # Modules and declarations ############################################################################## -require 5.003; +require 5.006; use strict; -use vars qw($CRITICAL $ID $RXDEBUG $TIMEOUT $WARNINGS); use Getopt::Long qw(GetOptions); + ############################################################################## # Site configuration ############################################################################## # The default count of blocked connections at which to warn or send a critical # alert. These can be overridden with the -w and -c command-line options. -$WARNINGS = 2; -$CRITICAL = 8; +our $WARNINGS = 2; +our $CRITICAL = 8; # The default timeout in seconds (implemented by alarm) for rxdebug. -$TIMEOUT = 60; +our $TIMEOUT = 60; # The full path to rxdebug. Make sure that this is on local disk so that # monitoring doesn't have an AFS dependency. -($RXDEBUG) = grep { -x $_ } qw(/usr/bin/rxdebug /usr/local/bin/rxdebug); +our ($RXDEBUG) = grep { -x $_ } qw(/usr/bin/rxdebug /usr/local/bin/rxdebug); $RXDEBUG ||= '/usr/bin/rxdebug'; - ############################################################################## # Implementation ############################################################################## @@ -51,21 +51,19 @@ $RXDEBUG ||= '/usr/bin/rxdebug'; # Parse command line options. my ($help, $host, $version); Getopt::Long::config ('bundling', 'no_ignore_case'); -GetOptions ('critical|c=i' => \$CRITICAL, - 'hostname|H=s' => \$host, - 'help|h' => \$help, - 'timeout|t=i' => \$TIMEOUT, - 'version|V' => \$version, - 'warning|w=i' => \$WARNINGS) or exit 3; +GetOptions ('c|critical=i' => \$CRITICAL, + 'H|hostname=s' => \$host, + 'h|help' => \$help, + 't|timeout=i' => \$TIMEOUT, + 'V|version' => \$version, + 'w|warning=i' => \$WARNINGS) or exit 3; if ($help) { print "Feeding myself to perldoc, please wait....\n"; exec ('perldoc', '-t', $0) or die "Cannot fork: $!\n"; } elsif ($version) { - my $version = join (' ', (split (' ', $ID))[1..3]); - $version =~ s/,v\b//; + my $version = $VERSION; $version =~ s/(\S+)$/($1)/; - $version =~ tr%/%-%; - print $version, "\n"; + print "check_bos $version\n"; exit 0; } if (@ARGV) { @@ -84,8 +82,8 @@ $SIG{ALRM} = sub { }; alarm ($TIMEOUT); -# Run rxdebug and parse the output, counting the number of waiting for process -# connections that we have. +# Run rxdebug and parse the output to find the number of calls waiting for a +# thread. unless (open (RXDEBUG, "$RXDEBUG $host -noconn |")) { warn "$0: cannot run rxdebug\n"; exit 3; @@ -129,21 +127,21 @@ check_rxdebug - Check AFS servers for blocked connections in Nagios =head1 SYNOPSIS -check_rxdebug [B<-hV>] [B<-c> I] [B<-w> I] -[B<-t> I] B<-H> I +B [B<-hV>] [B<-c> I] [B<-w> I] + [B<-t> I] B<-H> I =head1 DESCRIPTION -B is a Nagios plugin for checking AFS file servers to see if -there are client connections waiting for a free thread. If there are more -than a few of these, AFS performance tends to be very slow; this is a fairly -reliable way to catch overloaded file servers. By default, B -returns a critical error if there are more than eight connections waiting -for a free thread and a warning if there are more than two. These -thresholds can be changed with the B<-c> and B<-w> options. +B is a Nagios plugin for checking AFS file servers to see +if there are client connections waiting for a free thread. If there are +more than a few of these, AFS performance tends to be very slow; this is a +fairly reliable way to catch overloaded file servers. By default, +B returns a critical error if there are more than eight +connections waiting for a free thread and a warning if there are more than +two. These thresholds can be changed with the B<-c> and B<-w> options. -B will always print out a single line of output including the -number of blocked connections, displaying whether this is critical, a +B will always print out a single line of output including +the number of blocked connections, displaying whether this is critical, a warning, or okay. =head1 OPTIONS @@ -183,11 +181,11 @@ should be an integer. The default is 2. =head1 EXIT STATUS -B 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 there is a warning, and with status 2 if there is a critical problem. -For other errors, such as invalid syntax, B will exit with -status 3. +B 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 there is a warning, and with status 2 if there is a critical +problem. For other errors, such as invalid syntax, B will +exit with status 3. =head1 BUGS @@ -199,27 +197,29 @@ conform to Nagios standards. =head1 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. +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. =head1 SEE ALSO -The current version of this and other AFS monitoring plugins for Nagios are -available from the AFS monitoring tools page at -L. +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 L. =head1 AUTHORS -The original idea behind this script was from Neil Crellin. It was updated -by Quanah Gibson-Mount to work with Nagios, and then further updated by Russ -Allbery to support more standard options and to use a -more uniform coding style. +The original idea behind this script was from Neil Crellin. It was +updated by Quanah Gibson-Mount to work with Nagios, and then further +updated by Russ Allbery to support more standard +options and to use a more uniform coding style. =head1 COPYRIGHT AND LICENSE -Copyright 2003, 2004, 2005 Board of Trustees, Leland Stanford Jr. University. +Copyright 2003, 2004, 2005, 2010 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. diff --git a/check_udebug b/check_udebug index e3d0d30..b63ca0d 100755 --- a/check_udebug +++ b/check_udebug @@ -1,10 +1,10 @@ #!/usr/bin/perl -w -# $ID = q$Id$; +our $VERSION = '@VERSION@ @DATE@'; # # check_udebug -- Check AFS database servers using udebug for Nagios. # # Written by Russ Allbery -# Copyright 2004 Board of Trustees, Leland Stanford Jr. University +# Copyright 2004, 2010 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. @@ -18,10 +18,9 @@ # Modules and declarations ############################################################################## -require 5.003; +require 5.006; use strict; -use vars qw($ID $TIMEOUT $UDEBUG); use Getopt::Long qw(GetOptions); @@ -30,14 +29,13 @@ use Getopt::Long qw(GetOptions); ############################################################################## # The default timeout in seconds (implemented by alarm) for udebug. -$TIMEOUT = 10; +our $TIMEOUT = 10; # The full path to udebug. Make sure that this is on local disk so that # monitoring doesn't have an AFS dependency. -($UDEBUG) = grep { -x $_ } qw(/usr/bin/udebug /usr/local/bin/udebug); +our ($UDEBUG) = grep { -x $_ } qw(/usr/bin/udebug /usr/local/bin/udebug); $UDEBUG ||= '/usr/bin/udebug'; - ############################################################################## # Implementation ############################################################################## @@ -45,20 +43,18 @@ $UDEBUG ||= '/usr/bin/udebug'; # Parse command line options. my ($help, $host, $port, $version); Getopt::Long::config ('bundling', 'no_ignore_case'); -GetOptions ('hostname|H=s' => \$host, - 'help|h' => \$help, - 'port|p=i' => \$port, - 'timeout|t=i' => \$TIMEOUT, - 'version|V' => \$version) or exit 3; +GetOptions ('H|hostname=s' => \$host, + 'h|help' => \$help, + 'p|port=i' => \$port, + 't|timeout=i' => \$TIMEOUT, + 'V|version' => \$version) or exit 3; if ($help) { print "Feeding myself to perldoc, please wait....\n"; exec ('perldoc', '-t', $0) or die "Cannot fork: $!\n"; } elsif ($version) { - my $version = join (' ', (split (' ', $ID))[1..3]); - $version =~ s/,v\b//; + my $version = $VERSION; $version =~ s/(\S+)$/($1)/; - $version =~ tr%/%-%; - print $version, "\n"; + print "check_bos $version\n"; exit 0; } if (@ARGV || !(defined ($host) && defined ($port))) { @@ -73,7 +69,7 @@ $SIG{ALRM} = sub { }; alarm ($TIMEOUT); -# Run udebug and parse the output. We're looking for three things: first, +# Run udebug and parse the output. We're looking for three things: first, # we're looking to see if this host claims to be the sync site. If so, check # that recovery state is 1f. Otherwise, make sure that there's a defined sync # host. @@ -115,21 +111,22 @@ check_udebug - Check AFS servers for blocked connections in Nagios =head1 SYNOPSIS -check_udebug [B<-hV>] [B<-t> I] B<-H> I B<-p> I +B [B<-hV>] [B<-t> I] B<-H> I B<-p> I =head1 DESCRIPTION -B is a Nagios plugin for checking AFS database servers to make -sure the Ubik replication between the database servers is running correctly. -B is used to connect to the specified port, which should generally -be one of 7002 (ptserver), 7003 (vlserver), or 7004 (kaserver), on the -specified server. The resulting output is checked to make sure that the -recovery state is 1f if that server is the sync site, or that a sync site is -known if that server doesn't claim to be the sync site. +B is a Nagios plugin for checking AFS database servers to +make sure the Ubik replication between the database servers is running +correctly. B is used to connect to the specified port on the +specified server. The port should generally be one of 7002 (ptserver), +7003 (vlserver), or 7004 (kaserver). The resulting output is checked to +make sure that the recovery state is 1f if that server is the sync site, +or that a sync site is known if that server doesn't claim to be the sync +site. B will always print out a single line of output. That line -will be C if everything is fine, or C followed by -an error message otherwise. +will be C if everything is fine, or C followed +by an error message otherwise. =head1 OPTIONS @@ -147,9 +144,9 @@ to C). =item B<-p> I, B<--port>=I -The port to connect to on the AFS database server. This should generally be -one of 7002 (ptserver), 7003 (vlserver), or 7004 (kaserver). This option is -required. +The port to connect to on the AFS database server. This should generally +be one of 7002 (ptserver), 7003 (vlserver), or 7004 (kaserver). This +option is required. =item B<-t> I, B<--timeout>=I @@ -164,31 +161,32 @@ Print out the version of B and quit. =head1 EXIT STATUS -B 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 are critical problems. For other errors, such as invalid -syntax, B will exit with status 3. +B 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 are critical problems. For other errors, such as +invalid syntax, B will exit with status 3. =head1 BUGS -The standard B<-v> verbose Nagios plugin option is not supported. It should -print out the full B output. +The standard B<-v> verbose Nagios plugin option is not supported. It +should print out the full B output. The usage message for invalid options and for the B<-h> option doesn't conform to Nagios standards. =head1 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. +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. =head1 SEE ALSO -The current version of this and other AFS monitoring plugins for Nagios are -available from the AFS monitoring tools page at -L. +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 L. =head1 AUTHORS @@ -196,7 +194,7 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2004 Board of Trustees, Leland Stanford Jr. University. +Copyright 2004, 2010 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. -- 2.39.5