Monitoring EdgeOS bandwidth with Munin
Ubquiti’s routers are reliable and flexible, but they lack a certain.. consumer polish. One thing missing from the graph is any sort of historical bandwidth tracking or graphs. There’s no way to see what bandwidth you used in the last 5 minutes, much less the last year.
But EdgeOS does support SNMP. So you can collect the SNMP data on a Munin node running on another computer and graph it.
Step 1: turn on SNMP following something like these instructions. I did this via the router GUI instead using the Config Tree wizard. The two settings that are important are
snmp {
community public {
authorization ro
}
listen-address 192.168.0.1 {
port 161
}
}
Note there’s no real security in this kind of SNMP, anyone with access to that listen-address will be able to read a bunch of state off your router.
I was able to test SNMP was working with snmpwalk but I forget exactly what command worked. SNMP is a mystery to me.
Step 2: configure your Munin node to read the SNMP data. I used this guide. It basically has you use munin-node-configure to detect what SNMP data is available and then symlink a bunch of plugins. Then you add a “virtual node” for the router to your munin.conf.
The resulting config is overkill; I’m not sure I need to measure my router’s disk usage, thank you. Also there’s like 8 graphs for the network and I haven’t quite figured out which opaquely numbered interface is the WAN I care about monitoring. I figure after a day’s data is collected it’ll be clear what’s useful to keep.
Update: here’s what I kept
snmp_192.168.0.1_cpuload
snmp_192.168.0.1_if_2
snmp_192.168.0.1_load
snmp_192.168.0.1_netstat
snmp_192.168.0.1_uptime

The graph shows a big upload I did out of my network maxing out at ~10Mbps. Incoming bandwidth maxes out at 250Mbps so if I ever saturate that the scale on this graph is going to go to hell.
Comments
With the Ubiquiti USG I get a bandwidth chart for every 5 minutes over the past 24 hours but no way to control the time period or see a breakdown by which device is using how much bandwidth. Tomato had better data than this :-(
The USG isn't EdgeOS, right? It runs something more like the Unifi AC's Controller based system?
Anyway, yeah, it's seriously lacking in consumer features. It does route like a champion though.
Oh, yeah, I keep forgetting that they have very similar products with very different software. :-/