Title: [opsview] [11500] Fixed incorrect timeouts + SNMP versions in some converted plugins
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/CHANGES	2013-02-15 12:08:31 UTC (rev 11500)
@@ -6,6 +6,7 @@
     ENHANCEMENTS:
     NOTICES:
     FIXES:
+    Fixed incorrect SNMP version definition and timeout values
     Fixed check_snmp_weblogic_jmsmsgbridge to reincorporate caching host data to a file
 
 3.20130212

Modified: trunk/opsview-core/lib/Opsview/NagiosPlugin/SNMP.pm
===================================================================
--- trunk/opsview-core/lib/Opsview/NagiosPlugin/SNMP.pm	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/lib/Opsview/NagiosPlugin/SNMP.pm	2013-02-15 12:08:31 UTC (rev 11500)
@@ -149,7 +149,8 @@
 
     my $opts = $self->opts;
 
-    if ( $opts->get('snmp-version') eq '3' ) {
+    my $version = $opts->get( 'snmp-version' );
+    if ( $version eq '3' ) {
 
         my @errors;
 
@@ -162,12 +163,13 @@
           if scalar(@errors) > 0;
 
     }
-    else {
-
+    elsif ( $version eq "2c" || $version eq "1" ) {
         $self->die("SNMP parameter validation failed. Missing rocommunity!")
           if $opts->get('rocommunity') eq '';
-
     }
+    else {
+        $self->die( "Bad version: $version" );
+    }
 
     return 1;
 

Modified: trunk/opsview-core/nagios-plugins/check_snmp_apc_exttempprobe
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_apc_exttempprobe	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_apc_exttempprobe	2013-02-15 12:08:31 UTC (rev 11500)
@@ -33,7 +33,10 @@
     shortname => "check_snmp_apc_exttempprove",
     version   => "2.1.1",
     blurb     => "APC UPS external temperature probe reading",
-    snmp      => { "snmp-version" => 1, },
+    snmp      => {
+        "snmp-version" => 1,
+        "snmp-timeout" => 2,
+    },
 );
 
 $np->add_arg(

Modified: trunk/opsview-core/nagios-plugins/check_snmp_cisco_asa_hastatus
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_cisco_asa_hastatus	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_cisco_asa_hastatus	2013-02-15 12:08:31 UTC (rev 11500)
@@ -32,7 +32,10 @@
     shortname => "check_snmp_cisco_asa_hastatus",
     version   => "1.1",
     blurb     => "Checks status of Cisco CSS pair in HA mode",
-    snmp      => { "snmp-version" => 1 },
+    snmp      => {
+        "snmp-version" => 1,
+        "snmp-timeout" => 2,
+    },
 );
 
 $np->getopts;

Modified: trunk/opsview-core/nagios-plugins/check_snmp_cisco_bgppeer
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_cisco_bgppeer	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_cisco_bgppeer	2013-02-15 12:08:31 UTC (rev 11500)
@@ -33,7 +33,10 @@
     shortname => "check_snmp_cisco_bgppeer",
     version   => "2.1.1",
     blurb     => "Checks the status of a Cisco BGP peer.",
-    snmp      => { "snmp-version" => 1 },
+    snmp      => {
+        "snmp-version" => 1,
+        "snmp-timeout" => 2,
+    },
 );
 
 $np->add_arg(

Modified: trunk/opsview-core/nagios-plugins/check_snmp_cisco_bits_sec
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_cisco_bits_sec	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_cisco_bits_sec	2013-02-15 12:08:31 UTC (rev 11500)
@@ -32,7 +32,8 @@
     blurb =>
       "Checks five minute throughput avg (inbound and outbound) for a Cisco interface",
     snmp => {
-        "snmp-version" => 2,
+        "snmp-version" => "2c",
+        "snmp-timeout" => 5,
         "v1-fallback"  => 1,
     },
 );

Modified: trunk/opsview-core/nagios-plugins/check_snmp_cisco_ha
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_cisco_ha	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_cisco_ha	2013-02-15 12:08:31 UTC (rev 11500)
@@ -33,7 +33,10 @@
     shortname => "check_snmp_cisco_ha",
     version   => "2.1.1",
     blurb     => "Whether the Cisco PIX in HA mode is master",
-    snmp      => { "snmp-version" => 1 },
+    snmp      => {
+        "snmp-version" => 1,
+        "snmp-timeout" => 2,
+    },
 );
 
 $np->getopts;

Modified: trunk/opsview-core/nagios-plugins/check_snmp_netscaler_vserver
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_netscaler_vserver	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_netscaler_vserver	2013-02-15 12:08:31 UTC (rev 11500)
@@ -35,7 +35,7 @@
     blurb =>
       "Checks status of Netscaler vserver (number of up/down physical servers)",
     snmp => {
-        "snmp-version" => 2,
+        "snmp-version" => "2c",
         "v1-fallback"  => 1,
     },
 );

Modified: trunk/opsview-core/nagios-plugins/check_snmp_weblogic_jmsmsgbridge
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_weblogic_jmsmsgbridge	2013-02-15 11:50:17 UTC (rev 11499)
+++ trunk/opsview-core/nagios-plugins/check_snmp_weblogic_jmsmsgbridge	2013-02-15 12:08:31 UTC (rev 11500)
@@ -35,7 +35,7 @@
     version   => "1.1",
     blurb     => "Checks state of JMS Messaging Bridge",
     snmp      => {
-        "snmp-version" => 2,
+        "snmp-version" => "2c",
         "v1-fallback"  => 1,
     },
 );

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to