diff --git a/plugins/snmp/snmp__if_combined b/plugins/snmp/snmp__if_combined index 3ba23f08..b30b9bfe 100755 --- a/plugins/snmp/snmp__if_combined +++ b/plugins/snmp/snmp__if_combined @@ -539,22 +539,6 @@ sub do_preprocess { sub do_config_root { my ($host, $version) = @_; - my $extrainfo=""; - - if (defined ($snmpinfoX->{0}->{ifHCInOctets})) { - # If we get an answer at the 64 bit OID then this switch - # supports the extended MIB - - $extrainfo .= " This switch supports 64 bit byte counters and these are used by this plugin."; - } else { - # If not we only have a 32 bit counter and are lost. - $extrainfo .= " NOTE! This switch supports only 32 bit byte counters which makes the plugin unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that for interfaces where much traffic is sent this plugin will report false thruputs and cannot be trusted."; - - # unless perhaps the operator can get us snmp version 2c or 3? - $extrainfo .= " I notice that you use SNMP version 1 which does not support 64 bit quantities. You may get better results if you switch to SNMP version 2c or 3. Please refer to the plugin documentation." - if $version == 1; - } - print <{$if}->{ifHCInOctets})) { + # If we get an answer at the 64 bit OID then this switch + # supports the extended MIB + + $extrainfo .= " This switch supports 64 bit byte counters and these are used by this plugin."; + } else { + # If not we only have a 32 bit counter and are lost. + $extrainfo .= " NOTE! This switch supports only 32 bit byte counters which makes the plugin unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that for interfaces where much traffic is sent this plugin will report false throughputs and cannot be trusted."; + + # unless perhaps the operator can get us snmp version 2c or 3? + $extrainfo .= " I notice that you use SNMP version 1 which does not support 64 bit quantities. You may get better results if you switch to SNMP version 2c or 3. Please refer to the plugin documentation." + if $version == 1; + } if (defined ($speed = $snmpinfoX->{$if}->{ifHighSpeed}) and $speed) { # Speed in 1,000,000 bits per second @@ -644,19 +643,21 @@ sub do_config_if { $extrainfo .= ' '.$textspeed if $textspeed; } elsif (defined ($speed = $snmpinfo->{$if}->{ifSpeed}) and $speed) { # Speed in bits pr. second - $warn = $speed*100/75; + $warn = $speed*100/75; - my $textspeed = scaleNumber($speed,'bps','', - 'The interface speed is %.1f%s%s.'); + my $textspeed = scaleNumber($speed,'bps','', + 'The interface speed is %.1f%s%s.'); - $extrainfo .= " ".$textspeed if $textspeed; + $extrainfo .= " ".$textspeed if $textspeed; } $response = $snmpinfo->{$if}->{ifType}; + $extrainfo .= " This is a '".$ifTypeByNum{$response}."' interface."; print <