Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
munin eth0 traffic graphs missing, patch #896
i'm running on a ubuntu 14.04 droplet on digitalocean.
munin did show missing graphs for eth0 traffic. a quick lock into
i then ran the if_eth0 plugin manually which yielded a negative value for the DS MAX value of the rrd config - see
then i went to munin on github and looked at the plugin's history just to find 2 commits around this issue:
applying munin-monitoring/munin@f982751 manually to the plugin on my machine resolved the issue. the following is the diff which might be helpful to others and maybe should be integrated with mailinabox by way of just applying the patch or maintaining a seperate ppa or somehow pulling in a version of munin newer than 2.0.19 (which was released in 2014).
--- if_.orig 2016-08-02 23:52:05.691224811 +0200 +++ if_ 2016-08-02 23:52:49.563223127 +0200 @@ -91,7 +91,7 @@ # iwlist first) if [[ -r /sys/class/net/$INTERFACE/speed ]]; then SPEED=$(cat /sys/class/net/$INTERFACE/speed 2>/dev/null) - if [[ -n "$SPEED" ]]; then + if [ -n "$SPEED" -a "$SPEED" -gt "0" ]; then echo $SPEED return fi
if you trust the internet, you can apply this patch with this one-liner:
(be root before doing so)
I am sad to say that applying this patch did NOT work for me on a fresh Ubuntu 16.04 instance on Digital Ocean. I ended up putting:
on line 130 of
I don't know the Munin project (or its source) all that well--if anyone here has suggestions for how a change could be made to force Munin to treat Ethernet devices at 1 Gigabit to prevent this sort of breakage, I'm all for it--and I'll even help write the patch.
Also this patch did not help me directly, but pointed me in a good way. I added (after the patch) on line 97 the following:
and now finally one of my graphs is created! I think the reason the patch didn't work at first time is that the result of
This is a common problem for virtual network devices. In these cases you can also manually set the interface speed with ethtool (if your distro is recent enough), e.g.