alexandermarston / vnstat-dashboard

A responsive web UI to view network traffic statistics provided by vnStat (with support for version 2.x)
https://alexandermarston.github.io/vnstat-dashboard/
144 stars 60 forks source link

vnstat json does not have an id field #53

Open jeffbrissette opened 3 years ago

jeffbrissette commented 3 years ago

More an FYI, my version of vnstat does not dump the interface name as an id , rather it is name.

my version is vnStat 2.6

tomangert commented 3 years ago

I don't think this branch works well with vnstat 2.x yet.

I have a version here that works for me: https://github.com/tomangert/vnstat-dashboard

Feel free to try it

jeffbrissette commented 3 years ago

I actually got it work no problem with a few tweaks to the code for name instead id and changing the date format to something more ISO. Personally, I might write something for myself. The version of vnstat I have uses an SQLite db, which is pretty easy for PHP to read and do queries against.