Title: [opsview] [12328] Fixed check_snmp_interfaces_cascade where no ifSpeed is matched to an interface
Revision
12328
Author
tvoon
Date
2013-05-22 14:09:04 +0100 (Wed, 22 May 2013)

Log Message

Fixed check_snmp_interfaces_cascade where no ifSpeed is matched to an interface

Modified Paths

Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2013-05-22 12:32:43 UTC (rev 12327)
+++ trunk/CHANGES	2013-05-22 13:09:04 UTC (rev 12328)
@@ -40,6 +40,7 @@
     Fixed attributes with numbers in the name when processing commands
     Redirected 'call_nmis' cronjob output to the existing nmis.log logfile
     Stop running MRTG checks on a reload when SNMP is not enabled
+    Fixed check_snmp_interfaces_cascade where no ifSpeed is matched to an interface
     Fixed issue where Host Attributes Value of 0 being converted to empty string in UI
 
 3.20130304

Modified: trunk/opsview-core/nagios-plugins/check_snmp_interfaces_cascade
===================================================================
--- trunk/opsview-core/nagios-plugins/check_snmp_interfaces_cascade	2013-05-22 12:32:43 UTC (rev 12327)
+++ trunk/opsview-core/nagios-plugins/check_snmp_interfaces_cascade	2013-05-22 13:09:04 UTC (rev 12328)
@@ -792,7 +792,9 @@
     # Convert from bytes/second to bits/second and round it off
     my $throughput_in = int( $rates->{throughputIn} * 8 );
     my $throughput_in_pct;
-    if ( ( my $link_speed = $intdata->{ifSpeed}->numify ) > 0 ) {
+    if ( $intdata->{ifSpeed}
+        && ( my $link_speed = $intdata->{ifSpeed}->numify ) > 0 )
+    {
         $throughput_in_pct =
           nice_values( ( $rates->{throughputIn} * 8 * 100 ) / $link_speed, 2 );
     }
@@ -801,7 +803,9 @@
     # Convert from bytes/second to bits/second and round it off
     my $throughput_out = int( $rates->{throughputOut} * 8 );
     my $throughput_out_pct;
-    if ( ( my $link_speed = $intdata->{ifSpeed}->numify ) > 0 ) {
+    if ( $intdata->{ifSpeed}
+        && ( my $link_speed = $intdata->{ifSpeed}->numify ) > 0 )
+    {
         $throughput_out_pct =
           nice_values( ( $rates->{throughputOut} * 8 * 100 ) / $link_speed, 2 );
     }

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

Reply via email to