Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > d11764e18e9e9f7acf8823cd6fc238b7 > files > 112

nagios-plugins-1.4.14-8mdv2010.1.src.rpm

--- contrib/check_compaq_insight.pl	2003-02-09 15:20:30.000000000 +0100
+++ contrib/check_compaq_insight.pl.oden	2006-09-03 11:51:48.000000000 +0200
@@ -1,28 +1,3 @@
-From mm@elabnet.de Mon Nov 18 09:59:04 2002
-Date: Mon, 18 Nov 2002 12:19:04 +0100
-From: Michael Markstaller <mm@elabnet.de>
-To: nagiosplug-devel@lists.sourceforge.net
-Subject: [Nagiosplug-devel] Submission: check_insight / checking Compaq
-    Insight Agent status
-
-Hi,
-
-I've been looking to check the status/health of Compaq Insight Agents on
-servers and found a spong plugin
-(http://spong.sourceforge.net/downloads/plugins/spong-network/check_insi
-ght) which I've slightly changed to work with Nagios.
-I have pretty no idea of perl at all, just wanted to make it work for
-me, so please don't shoot me for this copy-paste-code. I've tested some
-basic things, it seems to work at least to report a warning if smthg is
-degraded and OK of xcourse ;)
-I'm also quite unsure if this is the right way to submit, so I'll just
-try ;)
-There're some "unknown" components on all servers I've checked so far,
-if anybody has a documentation of what's exactly returned when getting
-the OID 1.3.6.1.4.1.232.11.2.10.1.0 (CPQHOST_MIB isn't very descriptive)
-I'd be happy to fix this.
-
---- cut ---
 #!/usr/bin/perl
 #
 # (c)2002 Michael Markstaller, Elaborated Networks GmbH
@@ -47,8 +22,7 @@
 # Check Comapq Insight Management Agents Systems Status by SNMP
 # based on the spong-plugin check_insight from:
 #
-http://spong.sourceforge.net/downloads/plugins/spong-network/check_insig
-ht
+# http://spong.sourceforge.net/downloads/plugins/spong-network/check_insight
 #
 # Usage:
 # check_insight -H <host> -C community
@@ -88,12 +62,9 @@
         print "\n";
         print "check_insight nagios plugin version $version\n";
         print "\n";
-        print "The nagios plugins come with ABSOLUTELY NO WARRANTY.  You
-may redistribute\n";
-        print "copies of the plugins under the terms of the GNU General
-Public License.\n";
-        print "For more information about these matters, see the file
-named COPYING.\n";
+        print "The nagios plugins come with ABSOLUTELY NO WARRANTY.  You may redistribute\n";
+        print "copies of the plugins under the terms of the GNU General Public License.\n";
+        print "For more information about these matters, see the file named COPYING.\n";
         print "\n";
         print "(c)2002 Michael Markstaller, Elaborated Networks GmbH\n";
         print "\n";
@@ -172,10 +143,8 @@
   } else {
     $session->close;
 
-    # I'm not convinced that this is the easiest way to go about this,
-this is
-    # from some code which I've inherited and I've modified for use in
-here.
+    # I'm not convinced that this is the easiest way to go about this, this is
+    # from some code which I've inherited and I've modified for use in here.
     # Hi George!
     %h = %$response;
     my ($d) = $h{$oid};
@@ -199,15 +168,13 @@
     foreach my $v (@MIBs) {
       $cond = $list[($v*4)+1];  # A little bit of magic.
 
-      # We only bother printing the status out if it's actually
-available,
+      # We only bother printing the status out if it's actually available,
       # as if it's N/A or Unknown then it's probably because the machine
       # isn't available.
       $message .= "$MIBName[$v]: $State[$cond] " if $cond > 1;
       next if $cond < 2;
 
-      # What follows is some trickery to try and not to override a
-previous
+      # What follows is some trickery to try and not to override a previous
       # message at the same or lower color.
       if ($cond == 4) {
         if ($color ne 'red') {
@@ -222,8 +189,7 @@
       } elsif ($cond < 2) {
         if ($color eq 'green') {
           $color = 'yellow';
-          $summary = "$MIBName[$v] is unknown ($cond)" if $summary eq
-"";
+          $summary = "$MIBName[$v] is unknown ($cond)" if $summary eq "";
         }
       }
     }
@@ -253,18 +219,14 @@
         print "\n";
         print "check_insight nagios plugin version $version\n";
         print "\n";
-        print "The nagios plugins come with ABSOLUTELY NO WARRANTY.  You
-may redistribute\n";
-        print "copies of the plugins under the terms of the GNU General
-Public License.\n";
-        print "For more information about these matters, see the file
-named COPYING.\n";
+        print "The nagios plugins come with ABSOLUTELY NO WARRANTY.  You may redistribute\n";
+        print "copies of the plugins under the terms of the GNU General Public License.\n";
+        print "For more information about these matters, see the file named COPYING.\n";
         print "\n";
         print "(c)2002 Michael Markstaller, Elaborated Networks GmbH\n";
         print "\n";
         print "\n";
-        print "This plugin checks the Compaq Insight Management agents
-system status via SNMP on the specified host.\n";
+        print "This plugin checks the Compaq Insight Management agents system status via SNMP on the specified host.\n";
         print "\n";
         print "\n";
         print_usage();
@@ -281,16 +243,3 @@
         print "\n";
         print "\n";
 } 
---- cut ---
-
-Michael
-
-
--------------------------------------------------------
-This sf.net email is sponsored by: To learn the basics of securing 
-your web site with SSL, click here to get a FREE TRIAL of a Thawte 
-Server Certificate: http://www.gothawte.com/rd524.html
-_______________________________________________
-Nagiosplug-devel mailing list
-Nagiosplug-devel@lists.sourceforge.net
-https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel