]> git.michaelhowe.org Git - packages/a/afs-monitor.git/commitdiff
fix gloabl variable problem
authorXueshan Feng <sfeng@stanford.edu>
Fri, 22 Sep 2006 05:03:33 +0000 (05:03 +0000)
committerXueshan Feng <sfeng@stanford.edu>
Fri, 22 Sep 2006 05:03:33 +0000 (05:03 +0000)
check_afsspace
check_bos
check_rxdebug
check_udebug

index b0eacd81a8994d48a73570f33944c8c3c2bb9d51..0e9fbcebcdb6a491ac1eae929f5f1dca8b353076 100755 (executable)
 # percentage and with status 2 if the free space is above a critical
 # percentage (this works with the Nagios check architecture).
 
+##############################################################################
+# Modules and declarations
+##############################################################################
+
+require 5.003;
+
+use strict;
+use vars qw($CRITICAL $ID $TIMEOUT $VOS $WARNINGS);
+
+use Getopt::Long qw(GetOptions);
 ##############################################################################
 # Site configuration
 ##############################################################################
@@ -32,16 +42,6 @@ $TIMEOUT = 300;
 ($VOS) = grep { -x $_ } qw(/usr/bin/vos /usr/local/bin/vos);
 $VOS ||= '/usr/bin/vos';
 
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-require 5.003;
-
-use strict;
-use vars qw($CRITICAL $ID $TIMEOUT $VOS $WARNINGS);
-
-use Getopt::Long qw(GetOptions);
 
 ##############################################################################
 # Implementation
index 7635e512f1f57be6496050438359f4576c71f880..428cd1b4dd7b38b5c893214da4bf121ec8f96b1f 100755 (executable)
--- a/check_bos
+++ b/check_bos
 # true, print that information to STDOUT.  Suitable for being run inside
 # Nagios.
 
+##############################################################################
+# Modules and declarations
+##############################################################################
+
+require 5.005;
+
+use strict;
+use vars qw($BOS $ID @OKAY $TIMEOUT);
+
+use Getopt::Long qw(GetOptions);
 ##############################################################################
 # Site configuration
 ##############################################################################
@@ -43,16 +53,6 @@ $TIMEOUT = 10;
     qr/^\s*Command \d+ is /
 );
 
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-require 5.005;
-
-use strict;
-use vars qw($BOS $ID @OKAY $TIMEOUT);
-
-use Getopt::Long qw(GetOptions);
 
 ##############################################################################
 # Implementation
index d2d34ca617cfa28a93ef443e094cd72199cd3dff..d09b4b2e0093426b3013b250d5e924bf532102ac 100755 (executable)
 # warning) and with status 2 if there are more than eight connections in that
 # state.  The thresholds can be overridden from the command line.
 
+##############################################################################
+# Modules and declarations
+##############################################################################
+
+require 5.003;
+
+use strict;
+use vars qw($CRITICAL $ID $RXDEBUG $TIMEOUT $WARNINGS);
+
+use Getopt::Long qw(GetOptions);
 ##############################################################################
 # Site configuration
 ##############################################################################
@@ -33,16 +43,6 @@ $TIMEOUT = 60;
 ($RXDEBUG) = grep { -x $_ } qw(/usr/bin/rxdebug /usr/local/bin/rxdebug);
 $RXDEBUG ||= '/usr/bin/rxdebug';
 
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-require 5.003;
-
-use strict;
-use vars qw($CRITICAL $ID $RXDEBUG $TIMEOUT $WARNINGS);
-
-use Getopt::Long qw(GetOptions);
 
 ##############################################################################
 # Implementation
index 45cadd48d6f290d7990f657320b6318a5913e9e5..e3d0d30105050cfba355ec0c5ee207d7b51bbeba 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-$ID = q$Id$;
+$ID = q$Id$;
 #
 # check_udebug -- Check AFS database servers using udebug for Nagios.
 #
@@ -14,6 +14,17 @@ $ID = q$Id$;
 # site (ensuring that it considers all of the other servers up-to-date) or if
 # any of the servers don't believe there is a sync site.
 
+##############################################################################
+# Modules and declarations
+##############################################################################
+
+require 5.003;
+
+use strict;
+use vars qw($ID $TIMEOUT $UDEBUG);
+
+use Getopt::Long qw(GetOptions);
+
 ##############################################################################
 # Site configuration
 ##############################################################################
@@ -26,16 +37,6 @@ $TIMEOUT = 10;
 ($UDEBUG) = grep { -x $_ } qw(/usr/bin/udebug /usr/local/bin/udebug);
 $UDEBUG ||= '/usr/bin/udebug';
 
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-require 5.003;
-
-use strict;
-use vars qw($ID $TIMEOUT $UDEBUG);
-
-use Getopt::Long qw(GetOptions);
 
 ##############################################################################
 # Implementation