/vnstat-edgerouter

vnstat gui for Ubiquiti Edgeroutern / EdgeOS Bandwidth

Primary LanguageShell

vnstat-edgerouter

vnstat GUI for Ubiquiti Edgerouter / EdgeOS Bandwidth Monitor

Requirements

  1. Enable debian packages on your EdgeOS device: https://help.ui.com/hc/en-us/articles/205202560-EdgeMAX-Add-other-Debian-packages-to-EdgeOS
  2. SSH to your device and install vnstat and vnstati: sudo apt-get -y install vnstat vnstati curl
  3. SSH to your device and run curl -fsSLo /tmp/vnstat-edgerouter.run https://github.com/bdwilson/vnstat-edgerouter/raw/master/vnstat-edgerouger.run && sudo sh /tmp/vnstat-edgerouter.run
  4. If you don't want to run the above command, get the repo local to your device, perhaps in /tmp/vnstat, and run sudo ./install.sh

You should now be able to access http://your.router.ip/media/stat/ (it will take awhile to get stats unless you're upgrading).

Notes

This has only been tested on EdgeOS 1.x NOT 2.x. If you test it on 2.x, please let me know. It should be easy enough to uninstall if things don't work.

If your home internet quota resets on a different date, edit /etc/vnstat.conf and update MonthRotate 19 and restart vnstat.

Uninstall

SSH to your device and run sudo /config/vnstat/uninstall.sh

Upgrading EdgeOS?

Make sure you run sudo /config/vnstat/backup.sh before you upgrade. After your upgrade you shouldn't have to do anything as there is a script /config/scripts/post-config.d/vnstat-restore.sh that will run on boot. If you've upgraded to an unsupported version where they made lighttpd changes. If you've done this, you may need to sudo /config/vnstat/uninstall.sh to debug the issue.

Upgrading this code?

Re-run the installer (step #3) above.