diff --git a/plugins/snmp/snmp__if_combined b/plugins/snmp/snmp__if_combined index f449f545..222d3513 100755 --- a/plugins/snmp/snmp__if_combined +++ b/plugins/snmp/snmp__if_combined @@ -613,10 +613,8 @@ END print <{$if}->{ifHCInOctets} || - $snmpinfo->{$if}->{ifInOctets})) { - print "recv.value $response\n"; - } else { - # No response... - print "recv.value U\n"; - } + $response = $snmpinfoX->{$if}->{ifHCInOctets} || $snmpinfo->{$if}->{ifInOctets}; + printf("recv.value %s\n", defined($response) ? ($response * 8) : "U"); - if (defined ($response = $snmpinfoX->{$if}->{ifHCOutOctets} || - $snmpinfo->{$if}->{ifOutOctets})) { - print "send.value $response\n"; - } else { - # No response... - print "send.value U\n"; - } + $response = $snmpinfoX->{$if}->{ifHCOutOctets} || $snmpinfo->{$if}->{ifOutOctets}; + printf("send.value %s\n", defined($response) ? ($response * 8) : "U"); if_errors: