Giter VIP home page Giter VIP logo

vnstat-web's Introduction

vnstat-web

A web interface for vnstat using Chart.js for visuals.

screenshot of vnstat-web

Features

  • Automatic light/dark theme
  • Colorful graphs
  • User-selectable time scales:
    • hourly
    • daily
    • monthly
    • yearly
    • top days
  • Supports any network interface monitored by vnstat

Important note

This is a very new project, and as such, there will probably be many breaking changes in the near future. Use the latest tag if you want to deploy this software.

Usage

vnstat version 2.x must be configured first. To set up the web interface, simply place the following files in a directory served by your HTTP server:

  • index.html
  • style.css
  • main.js
  • Chart.min.js
  • data.php

Note: data.php must be run by a PHP interpreter. Simply serving the static content will not work.

The data.php script will automatically get data from vnstat's JSON output. Make sure the vnstat executable is in the PATH of the PHP interpreter. If you installed vnstat using a package manager, this should be done automatically.

Configuration & customization

Currently, no central configuration/customization location is provided. To customize the page structure, edit the index.html and style.css files. To customize the behavior of the graphs and data processing, edit the main.js file, which includes comments to enhance readability.

There shouldn't be much need to edit the data.php backend, but that's where the backend code is located if it needs to be changed.

vnstat-web's People

Contributors

kdkasad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vnstat-web's Issues

No data or graphs visible

I was testing this out by cloning the repo and just serving it using php -S localhost:8080 command. The page loads up but no graphs are visible.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.