Title: [opsview] [12161] Downgrade check_snmp_interfaces_cascade errors with invalid percentage utilisation (critical) and long plugin execution time (warning) to be unknowns instead
Revision
12161
Author
tvoon
Date
2013-04-23 10:51:30 +0100 (Tue, 23 Apr 2013)

Log Message

Downgrade check_snmp_interfaces_cascade errors with invalid percentage utilisation (critical) and long plugin execution time (warning) to be unknowns instead

Modified Paths

Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2013-04-23 06:07:13 UTC (rev 12160)
+++ trunk/CHANGES	2013-04-23 09:51:30 UTC (rev 12161)
@@ -12,6 +12,7 @@
     New Opspack: MySQL Server, replacing existing MySQL
     New Opspack: Apache HTTP Server, replacing existing Apache HTTP
     Management URLs open in a new window for http and https methods
+    Downgrade check_snmp_interfaces_cascade errors with invalid percentage utilisation (critical) and long plugin execution time (warning) to be unknowns instead
     NOTICES:
     Removed OS - Linux Advanced opspack from fresh installs
     FIXES:

Modified: trunk/opsview-core/nagios-plugins/check_snmp_interfaces_cascade
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_interfaces_cascade	2013-04-23 06:07:13 UTC (rev 12160)
+++ trunk/opsview-core/nagios-plugins/check_snmp_interfaces_cascade	2013-04-23 09:51:30 UTC (rev 12161)
@@ -54,6 +54,7 @@
 my $start_time       = time();
 my $poller_criticals = [];
 my $poller_warnings  = [];
+my $poller_unknowns  = [];
 my $debug_data;
 
 # About us
@@ -805,7 +806,10 @@
         $debug_data .= '$intdata=' . Data::Dump::dump($intdata) . $/;
         $debug_data .= '$rates' . Data::Dump::dump($rates) . $/;
         $debug_data .= $/;
-        push @$poller_criticals,
+
+        # This is downgraded to be an UNKNOWN state. One scenario is that the device is reporting the wrong speed, and thus the percentage
+        # is too high
+        push @$poller_unknowns,
           "Got strange percent values for interface $intdata->{display_name} (in:${throughput_in_pct}%, out:${throughput_out_pct}%)";
 
         # Disabled for the moment as we shouldn't just discard this result until more data
@@ -1195,22 +1199,28 @@
 my $end_time              = time();
 my $plugin_execution_time = $end_time - $start_time;
 if ( $plugin_execution_time > $polling_time + 10 ) {
-    push @$poller_warnings,
+
+    # This is downgraded to an UNKNOWN because it is not an error, but needs investigating
+    push @$poller_unknowns,
       "Plugin has taken too long to execute (${plugin_execution_time}s) - check SNMP version is specified correctly";
 }
 my $message;
 if (@$poller_criticals) {
-    $message = join( "; ", @$poller_criticals ) . "; ";
+    $message .= join( "; ", @$poller_criticals ) . "; ";
 }
 if (@$poller_warnings) {
-    $message = join( "; ", @$poller_warnings ) . "; ";
+    $message .= join( "; ", @$poller_warnings ) . "; ";
 }
+if (@$poller_unknowns) {
+    $message .= join( "; ", @$poller_unknowns ) . "; ";
+}
 $message
   .= "Polled $hostname with results for interfaces: $num_interfaces. Seconds taken to poll: $polling_time";
 if ($first_run) {
     $message .= ". First run";
 }
-my $rc = @$poller_criticals ? 2 : @$poller_warnings ? 1 : 0;
+my $rc =
+  @$poller_criticals ? 2 : @$poller_warnings ? 1 : @$poller_unknowns ? 3 : 0;
 if ($debug_data) {
 
     my $dumpfile = "$db_home/$nagios_hostname.debug";

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

Reply via email to