]> jspc29.x-matter.uni-frankfurt.de Git - hadesicinga.git/commitdiff
small changes. Sergey.
authorhadaq <hadaq>
Tue, 3 Mar 2009 10:51:39 +0000 (10:51 +0000)
committerhadaq <hadaq>
Tue, 3 Mar 2009 10:51:39 +0000 (10:51 +0000)
plugins/README
plugins/my_check_dhcp.pl
plugins/restart.pl

index 034843f0078a1b494b959b8b6bd084da2951d61c..e694f10fd3c1c06fb34b76d13fd1b45f811e474e 100644 (file)
@@ -1,33 +1,36 @@
-Plugin               Location     Comment
---------------------------------------------------------------
-check_backup.pl      hadeb07      checks backup on hadeb07.
-                                  Runs status server to report
-                                  status to Nagios. 
+Plugin                  Location     Comment
+--------------------------------------------------------------------
+check_backup.pl         hadeb07      Remote script. Checks backup 
+                                    on hadeb07. Runs status server 
+                                    to report status to Nagios. 
 
-check_archiver.pl    lxg0434      checks archiving process of
-                                  slow ctrl data to Oracle.
-                                  Runs status server to report
-                                  status to Nagios.
+check_archiver.pl       lxg0434      Remote script. Checks archiving 
+                                    process of slow ctrl data to 
+                                    Oracle. Runs status server to 
+                                    report status to Nagios.
 
-check_archivist.pl   hadesdaq     run by Nagios to check 
-                                 hades_archivist via
-                                 TCP socket connection. 
+check_archivist.pl      hadesdaq     Run by Nagios to check 
+                                    hades_archivist via
+                                    TCP socket connection. 
 
-check_lustre.pl      lxhadesdaq   checks Lustre mount. Checks
-                                  used disk space on Lustre.
-                                  Runs status server to report
-                                  status to Nagios.
+check_lustre.pl         lxhadesdaq   Remote script. Checks Lustre 
+                                    mount. Checks used disk space 
+                                    on Lustre. Runs status server 
+                                    to report status to Nagios.
 
-my_check_eblog.pl    lxhadesdaq   checks discarded events in 
-                                  eb_s.tcl written by EB. 
-                                  Runs status server to report
-                                  status to Nagios.
+my_check_eblog.pl       lxhadesdaq   Remote script. Checks discarded 
+                                    events in eb_s.tcl written by EB. 
+                                     Runs status server to report
+                                     status to Nagios.
 
-my_check_proc_status.pl hadesdaq  run by Nagios to receive
-                                  status report from remote
-                                  scripts.
+my_check_proc_status.pl hadesdaq     Run by Nagios to receive
+                                     status report from remote
+                                     scripts.
 
-restart.pl                        restarts a program (daemon) 
-                                  given as an argument on a list 
-                                 of remote machines. For example
-                                 used to restart check_lustre.pl
+my_check_dhcp.pl        hadesdaq     Run by Nagios. Checks if dhcp
+                                     daemon is running.
+
+restart.pl                           Restarts a program (daemon) 
+                                     given as an argument on a list 
+                                    of remote machines. For example
+                                    used to restart check_lustre.pl
index 469d2f3601f80135af0ed4f550295416bf349640..596dde8a67b49923f0c748115ca7650a229ccf96 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/perl -w
-# ----------------------------------------------------------------------------
+# ------------------------------------------------------------------------------
 # File Name:            my_check_process.pl
 # Author:               Sergey Yurevich
 # Date:                 05/04/2007
 # Version:              0.1
 # Description:          script will check if there is a process running
-# ----------------------------------------------------------------------------
+# ------------------------------------------------------------------------------
 
 use strict;
 use warnings;
@@ -19,17 +19,23 @@ my ($ip) = @ARGV;
 #dhcping                - check dhcp service
 #-c 140.181.67.143      - from  hadesdaq (140.181.67.143)
 #-s 140.181.75.158      - on lxhadesdaq (140.181.75.158)
-#-h 00:40:9E:00:99:E2   - if one gets an answer from MAC address (00:40:9E:00:99:E2)
+#-h 00:30:48:58:c0:88   - if one gets an answer from MAC (hadeb06)
+#                         used to be MAC of hadc02 (00:40:9E:00:99:E2)
 
-my $answer = `dhcping -c 140.181.67.143 -s $ip -h 00:40:9E:00:99:E2`;
+my $answer = `dhcping -c 140.181.67.143 -s $ip -h 00:30:48:58:c0:88`;
 chop($answer);
 
+#print "pids = $pids\n";
+#my @pid_list = split(' ',$pids);
+
 my $state;
 
 if($answer =~/Got answer from/){
+    #nagios exit code 0 = status OK = green
     $state = $ERRORS{'OK'};
 }
 else{
+    #nagios exit code 2 = status CRITICAL = red
     $state = $ERRORS{'CRITICAL'};
 }
 
index 1492de82eb5c3fe7fb3443cbfe7769d7939dedeb..3206c51b692c8c1bc9ed87c1972b27807495bdcf 100755 (executable)
@@ -22,8 +22,8 @@ if($opt_h){
 &checkArgs();
 
 #--- on these PCs the script should be restarted:
-my @PCList = ('lxg0429','lxg0433','lxg0435','lxg0437','lxg0439','lxg0440','lxg0441','lxg0442','lxg0443','lxg0444','lxg0445','lxg0446','lxg0447','lxg0448','lxg0452','lxg0453','lxg0454','lxg0455');
-#my @PCList = ('lxg0447');
+#my @PCList = ('lxg0429','lxg0433','lxg0435','lxg0437','lxg0439','lxg0440','lxg0441','lxg0442','lxg0443','lxg0444','lxg0445','lxg0446','lxg0447','lxg0448','lxg0452','lxg0453','lxg0454','lxg0455');
+my @PCList = ('lxg0429');
 my $args = "-d";    #- arguments of script to be restarted
 
 &main();