microhacker07 / vnstat-dashboard

A web dashboard for vnStat using bottle and Plotly js
5 stars 0 forks source link

vnstat-dashboard

Uses Bottle and Plotly JS to create some graphs to monitor data usage from a device.

Image of Web Frontend

Displays:

Why is this a thing when Offical vnstat-dashboard exists?

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.

Prerequisites

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

How to run

  1. Clone repo

git clone https://github.com/microhacker07/vnstat-dashboard.git

Or download the zip and extract it

  1. Move into the directory

cd path/to/vnstat-dashboard

  1. (Optional) If you want to run it in an virtual environment. To create a virtual environment:

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

  1. Install the required Python packages

pip3 install -r requirements.txt

  1. Run main.py

python3 main.py

Configuring

By editing the main.py you can change: