Uses Bottle and Plotly JS to create some graphs to monitor data usage from a device.
Displays:
I wrote this as my machine that runs vnstat is a raspberry pi and I had a bit of trouble getting the docker and docker-compose to install/compile/run on the pi. Also I have pihole installed on the machine did not want to interfere with that web page.
For the latest version of vnstat or install from your package manager
For Debian/Ubuntu:
sudo apt-get install vnstat
For Arch:
sudo pacman -S vnstat
And (if you want vnstat to log data usage in the background) start the vnstat logging daemon with:
vnstatd -d
git clone https://github.com/microhacker07/vnstat-dashboard.git
Or download the zip and extract it
cd path/to/vnstat-dashboard
python3 -m venv venv
This helps keeps your packages isolated from other projects. For more information here is the Python Doc
3.1. Activate the virtual environment
. venv/bin/activate
pip3 install -r requirements.txt
python3 main.py
By editing the main.py you can change:
0.0.0.0
binds to all interfaces8080
as I was testing it on a pi that already had a different webservice running on port 80