Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

tomangert
Copy link

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

tomangert and others added 10 commits July 21, 2019 09:03
Tested against vnstat 2.3 and vnstat 1.14
Use 'current' google chart version
5min graph duration adjusts automatically to screen width
Make graphs taller
More digits in graph data
Clean up base calculation
Add zoom/pan instructions
Fix vnstat v1 compatibility
@tomangert
Copy link
Author

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

@alexandermarston
Copy link
Owner

@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
Copy link
Author

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

@alexandermarston
Copy link
Owner

A few comments with this one initially, @tomangert :

  • The content now appears to take out the whole page width whereas before content was centered, could we please revert this to how it was?
  • I'm not sure the use of being able to pan and zoom the graph, given the small dataset it is.
  • Could you revert the formatting of the time in the hourly list to its original (i.e.: '8pm')

@tomangert
Copy link
Author

  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
Copy link
Owner

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

@tomangert
Copy link
Author

ok - probably tonight. (gmt-4 here)

    support for vnstat v2
    support for 5 minute data
    vnstat v1 compatible

    So far - graph in first tab is OK, other tabs are small and incomplete
    support for vnstat v2
    support for 5 minute data
    vnstat v1 compatible

    So far - graph in first tab is OK, other tabs are small and incomplete
@Schokobecher
Copy link

Hey - any update on this?

@tomangert
Copy link
Author

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
Copy link
Owner

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

@tomangert
Copy link
Author

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.

  1. 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.
  2. 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.

Tom Angert and others added 6 commits October 15, 2019 14:02
Fix occasional display error.
Clean up some floatingpoint math
Add logarithmic graph option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants