Giter VIP home page Giter VIP logo

vnstat-php-frontend's People

Contributors

bjd avatar bryanparadis avatar dickeny avatar jankeymeulen avatar jrgp avatar manolenso avatar mariusschiffer avatar nhellfire avatar phrozenbyte avatar theraven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vnstat-php-frontend's Issues

php 7.0 - error with graph_svg.php (Array to string conversion in line 48)

No svg graphs are shown, after digging into it, the svg contains a notice like

Notice: Array to string conversion in $webroot/vnstat/graph_svg.php on line 48

so as a quick workaround, these changes to the config.php file are helping, as long as this is not fixed

-error_reporting(E_ALL | E_NOTICE);
+error_reporting(E_ALL & ~E_NOTICE);

php vnstat.php fails at line 47

Hi team,

I just tried your vnstat PHP frontend and calling "php vnstat.php" from CLI failed with error in line 47 (T() undefined function).

What went wrong, pls ? My handling of the script, or something else ?

Thank you and kind regards

Michael

Data from dump not working.

Hi.
I think variables "$vnstat_bin" and "data_dir" in config should be default commented (or ='').
In vnstat.php in function get_vnstat_data:
if (!isset($vnstat_bin) || $vnstat_bin == '')
should be inverted to:
if (isset($vnstat_bin) && $vnstat_bin != '')
(If we have set location of dump get data from file)

[Feature Request] Realtime stats?

Hi, love this vnstat interface!

I'd really like to see a "realtime" page to show vnstat data if it is running in live (-l) mode.

At the moment I can only see hourly, daily & monthly.

Thanks for reading!

vnstat --dumpdb

Hello,
I'm not sure how much are you maintaining this project.
vnstat from version 2.0 doesn't support command vnstat --dumpdb as it is currently required for your frontend to fill the data from vnstat.
Here is the ticket and suggestion from vnstat maintainer: vergoh/vnstat#141
Seems that the best option would be using command:
vnstat --json
which exports data to json format and then to parse it properly.
What is your opinion?

I know, you may answer - "well, try to fix it yourself" . Maybe, not sure/not much time at the moment.

Thanks.
All the best,
Frank

Improve script location auto-detection

It looks like vnstat-php is trying to auto-detect the script's location and force all links to be under this root. This doesn't work if the location cannot be auto-detected (e.g. script is behind a reverse proxy).

I'm not actually sure if there's much point in the $script variable, as there's non-dynamic references to graph_svg.php, for example (so some dynamic path detection isn't being used anyway). I suppose if you want to allow the user to rename index.php to something else, it may come in handy, in which case, using basename on the $script variable would be just as effective.

Thanks for the script!

Run Cron Jobs From PHP

I have just followed these instructions:
http://www.4geeksfromnet.com/2009/04/graphical-bandwidth-monitor-for-ubuntu.html

I apologize if this is out of date. Rather than setting up a of cron job to create the data files for each interface, why not do it from a single php script and run it from either cron or index.php. Cron is probably the better option.

This feels a lot neater and requires only needs one script to be run by cron. The $data_dir obviously needs to be writable by the web server.
I'd recommend creating a file called "run.php" with the following contents:

<?php
require_once("config.php");
for($i = 0; $i < count($iface_list); $i++){
    $vnstat_bin." --dumpdb -i ".$iface_list[$i]." > ".$data_dir."/vnstat_dump_".$iface_list[$i];
}
?>

The cron service now need only run: "wget http://localhost/vnstat/run.php"

Adding
require_once('run.php');
to index.php, the system will always be showing the most up to date information and cron is not even needed. (Probably not great for production systems)

docker image

Do you have a docker image for your php frontend?

Not working under Ubuntu 20.x with PHP 7.4

I like this front-end and it has been working under Ubuntu 18.x with PHP 5.6
It stops working when I upgraded PHP to 7.4.
image

Any plans to make it compatible with higher PHP versions please? Thanks!

Use of google charts

Hi all,

Thank you for this great tool... But was wondering if you arent planning to upgrade the actual version using google charts... It is way better, more "shiny" and much beautiful :)

Thanks anyway :)

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.