After trying most of the bandwidth monitoring solutions listed in the Wiki, I decided to roll my own using an approach most similar to
wrtbwmon. I wanted the ability to monitor bandwidth per host both from within the LuCI interface (using
luci-app-statistics) as well as to be able to export the same data to an external data store.
iptmon is a shell script intended to be triggered by DHCP that adds
iptables rules to track RX/TX per host. Packet counts are then parsed by
collectd using the
iptables plugin (
collectd-mod-iptables), which exports the data to an external InfluxDB instance, finally ending up on pretty dashboards served up by Grafana.
It's lightweight, cross-platform, doesn't require a constantly running daemon eating CPU and memory, and uses the already present packet accounting functionality of the Linux kernel.
Link to code: https://github.com/oofnikj/iptmon
Currently under active development and open to PRs