mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
snmp__if_combined: don't set max speed if reported as 0
Some SNMP implementations actively report the interface speed as 0 (e.g., when disconnected). This led the plugin to report both min and max to be 0, which later confuses RRDTool, with errors such as [ERROR] Unable to create '/var/lib/munin/example.net/192.2.0.1-snmp_if_combined_vlan-37-send-d.rrd': failed to parse data source 600:0:0: min must be less than max in DS definition when trying to creates the RRDs. Ultimately, this would prevent the graph creation from suceeding with errors such as [ERROR] In RRD: Error updating /var/lib/munin/example.net/192.2.0.1-snmp_if_combined_vlan-37-send-d.rrd: opening '/var/lib/munin/example.net/192.2.0.1-snmp_if_combined_vlan-37-send-d.rrd': No such file or directory Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
4262dc8564
commit
baf24f9c94
1 changed files with 1 additions and 1 deletions
|
@ -806,7 +806,7 @@ send.negative recv
|
||||||
send.min 0
|
send.min 0
|
||||||
END
|
END
|
||||||
|
|
||||||
if ( defined($speed) ) {
|
if ( defined($speed) && $speed > 0) {
|
||||||
printf("recv.max %s\nsend.max %s\n", $speed, $speed);
|
printf("recv.max %s\nsend.max %s\n", $speed, $speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue