Giter VIP home page Giter VIP logo

vnstat-viewer's Introduction

vnstat-viewer

vnstat-viewer ist eine php-Anwendung unter Verwendung von Bootstrap und Google Charts. Angezeigt wird die Menge des Datenverkehrs an den Netzwerkschnittstellen. Als Basis wurde vnstat-dashboard verwendet und Anpassungen für vnstat der Version 2.4 vorgenommen. Funktionsumfang:

  • Tabellen und Charts unterschiedlicher Zeiteinheiten
  • Selektion der Netzwerkschnittstelle

Beispiel

Installation

$ cd tmp
$ git clone https://github.com/dalbenknicker/vnstat-viewer.git
$ cp -rp vnstat-viewer /srv/http/vnstat/
$ cd /srv/http/vnstat/
$ composer install

Konfiguration

Die angezeigten Namen der Schnittstellen können verändert werden. Bei einer konfigurierten ssh-Verbindung mit public key könnte z.b auch die Statistik eines entfernten host abgerufen werden. Siehe hierzu include/config.php

<?php

// einige Debugausgaben
// $DEBUG = 1;
$DEBUG = 0;

// Zeitzone
date_default_timezone_set('Europe/Berlin');

// Auswertung von vnstat für einen entfernten host
// gültige ssh-Verbindung mit public-key
// $vnstat_bin_dir = 'ssh myrouter vnstat --json';
// oder
// $vnstat_bin_dir = "echo userpassword|su -c 'ssh myrouter vnstat --json' username";

//localhost default
$vnstat_bin_dir = '/usr/bin/vnstat --json';

//Namen der angezeigtn Schnittstellen ändern
$iface_doreplace = true;
$iface_replace = [
  
    "enp3s0" => "My WAN",
    "tun0"   => "My VPN",
    "virbr0" => "My Container",
    
];

?>

vnstat-viewer's People

Contributors

dalbenknicker avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

thutex

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.