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/
142 stars 60 forks source link

Add support for 5 minute data from vnstat 2.x - compatible with vnstat 1.x #37

Open tomangert opened 5 years ago

tomangert commented 5 years ago

Tested with vnstat 2.3 and vnstat 1.14 on Ubuntu 16.04 / Apache 2.4.39

tomangert commented 5 years ago

Add zoom and pan capability to 5min/hour/day graphs More fixes / cleanup

alexandermarston commented 5 years ago

@tomangert thanks for doing some work on this and getting it up to date. I'll have a look at this PR in detail tonight hopefully.

Does PR #36 need to be closed now this one is open?

tomangert commented 5 years ago

Yes 36 can be closed - changes from 36 are included in 37.

alexandermarston commented 5 years ago

A few comments with this one initially, @tomangert :

tomangert commented 5 years ago

1) OK. 2) V2 allows you to configure the dataset size for each sampling interval. I have mine bumped up and it makes the pan/zoom pretty useful. 3) I can use am/pm instead of 24hr time - but if you have more than 24 hours in the data you need the day. I can check the time range and suppress the day if not needed.

alexandermarston commented 5 years ago

@tomangert can you update your copy against the new changes and we can have a look what it looks like.

tomangert commented 5 years ago

ok - probably tonight. (gmt-4 here)

Schokobecher commented 4 years ago

Hey - any update on this?

tomangert commented 4 years ago

The history on this is a bit of a mess. The end result is 5 files with changes. Let me know if I should redo this in a new pull request.

alexandermarston commented 4 years ago

@tomangert this looks good. Have you got an example of this running with the 5 minute dataset?

tomangert commented 4 years ago

Example sent in an email.

The current merge request is the minimum changes to get something working.

Problems / enhancements left to deal with (~decreasing severity): 1) vnstat2 keeps a lot more data. Current code displays it all on the initial graph. but frequently it is too much to see the individual bars. It needs to set the initial zoom level to show about the same as vnstat1 - or set number of time periods in config file - or compute on the fly based on screen size. 2) Scroll-to-zoom and drag-to-pan help, but parameters need tweaking to allow more zoom range and finer control. 3) Need to add help text for scroll/drag

The rest are not directly 5 minute/vnstat2 related and may just be my preferences.

4) Logarithmic graph. This can be a config file option. My network is lightly loaded 90% of the time (~1% of bandwidth) Other times it is moderately loaded (interactive or streaming something) and occasionally there is something saturating the bandwidth (backup or big download or ...) . With a linear graph I can only see saturated vs next to nothing most of the time. A logarithmic graph shows a lot more nuance. 5) Screen formatting. On medium to large screens the graphs are only using the middle half of the screen - about 1/4 of the screen is blank on both sides. For text that is useful to make it easier to read, but for graphs wider is better.