1
0
Fork 0
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:
Olivier Mehani 2022-01-06 22:32:10 +11:00
parent 4262dc8564
commit baf24f9c94

View file

@ -806,7 +806,7 @@ send.negative recv
send.min 0
END
if ( defined($speed) ) {
if ( defined($speed) && $speed > 0) {
printf("recv.max %s\nsend.max %s\n", $speed, $speed);
}