mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
snmp__if_combined: don't use cdef to generate the final value.
This actually simplifies the code, and avoids extra work on the master side for no reason.
This commit is contained in:
parent
7777738e05
commit
36ac271c5d
1 changed files with 4 additions and 18 deletions
|
@ -613,10 +613,8 @@ END
|
||||||
print <<END;
|
print <<END;
|
||||||
recv$if.label $alias
|
recv$if.label $alias
|
||||||
recv$if.graph no
|
recv$if.graph no
|
||||||
recv$if.cdef recv$if,8,*
|
|
||||||
send$if.label $alias
|
send$if.label $alias
|
||||||
send$if.negative recv$if
|
send$if.negative recv$if
|
||||||
send$if.cdef send$if,8,*
|
|
||||||
END
|
END
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -666,12 +664,10 @@ graph_category network
|
||||||
recv.label bps
|
recv.label bps
|
||||||
recv.type DERIVE
|
recv.type DERIVE
|
||||||
recv.graph no
|
recv.graph no
|
||||||
recv.cdef recv,8,*
|
|
||||||
recv.min 0
|
recv.min 0
|
||||||
send.label bps
|
send.label bps
|
||||||
send.type DERIVE
|
send.type DERIVE
|
||||||
send.negative recv
|
send.negative recv
|
||||||
send.cdef send,8,*
|
|
||||||
send.min 0
|
send.min 0
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -722,21 +718,11 @@ sub do_fetch_if {
|
||||||
goto if_errors;
|
goto if_errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined ($response = $snmpinfoX->{$if}->{ifHCInOctets} ||
|
$response = $snmpinfoX->{$if}->{ifHCInOctets} || $snmpinfo->{$if}->{ifInOctets};
|
||||||
$snmpinfo->{$if}->{ifInOctets})) {
|
printf("recv.value %s\n", defined($response) ? ($response * 8) : "U");
|
||||||
print "recv.value $response\n";
|
|
||||||
} else {
|
|
||||||
# No response...
|
|
||||||
print "recv.value U\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defined ($response = $snmpinfoX->{$if}->{ifHCOutOctets} ||
|
$response = $snmpinfoX->{$if}->{ifHCOutOctets} || $snmpinfo->{$if}->{ifOutOctets};
|
||||||
$snmpinfo->{$if}->{ifOutOctets})) {
|
printf("send.value %s\n", defined($response) ? ($response * 8) : "U");
|
||||||
print "send.value $response\n";
|
|
||||||
} else {
|
|
||||||
# No response...
|
|
||||||
print "send.value U\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if_errors:
|
if_errors:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue