The pfSense Store

Author Topic: New Traffic Totals package available for testing  (Read 11906 times)

0 Members and 1 Guest are viewing this topic.

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 531
  • Karma: +121/-0
  • Web Dude
    • View Profile
New Traffic Totals package available for testing
« on: July 07, 2016, 12:20:35 pm »
It uses the vnstat database (just takes the JSON output to make the graphs).

go forth and break things. (or just play around with it and have fun)

Known issues:

#1) There is an issue with the stacked bar graph. Documented here: https://github.com/novus/nvd3/issues/341#issuecomment-222370991

#2) If you have vnstat already running it will most likely override your options and also install the new database files in a different location than where yours currently are. This scenario is likely to produce the most edge cases.

#3) The start day defaults to 1 and is stored in the vnstat config file at the time of saving, but I don't have a way to get it back out of the config currently, so it shows up as blank. [fixed]

#4) Which ties into number four, there isn't a way to save the graph options at this time. [fixed]

#5) The cron job that grabs the data runs every 5 minutes and the interval isn't documented at this time. [fix pending]

#6a) units should be in KiB/MiB/etc and the Y axis label needs to be changed to reflect totals not speed. [fixed]

#6b) y axis tickmarks need custom formatting. [fixed]

#7) lists PHP as a dependency when it doesn't need to. [fixed]

#8) Top 10 Days only works when one interface is selected. I need to throw an error if multiple interfaces are selected. [fixed]

#9a) NanoBSD image is untested at this time, but should work. Data loss after a reboot needs to also be tested (actually, I may be able to tie the data into backups).

#9b) vnStat databases aren't being backed up.

#10a) Some interfaces are showing up blank. [fixed]

#10b) It looks like vnStat doesn't support virtual and aliased interfaces, so not all interfaces will show up. [not entirely true]

#11) match graph legend to interface names [fixed]

#12) the sortable table doesn't work after you update the graph or change the time period.

#13) looks like crap on mobile

#14) package needs to remove cron/config on uninstall
« Last Edit: July 29, 2016, 03:55:12 pm by jdillard »

Offline MyKroFt

  • Jr. Member
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #1 on: July 07, 2016, 02:22:32 pm »
Is there any way it can save the last graph settings for each of the 4 output options?

Thanks
Myk

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 531
  • Karma: +121/-0
  • Web Dude
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #2 on: July 07, 2016, 02:29:35 pm »
Ah no, I forgot about that. I haven't figured out a good way to save config options for this package just yet. I'll take another look at that as well.
« Last Edit: July 07, 2016, 02:34:27 pm by jdillard »

Offline MyKroFt

  • Jr. Member
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #3 on: July 07, 2016, 02:41:15 pm »
also

On the daily stats, can we have to option to reverse the order, newest on top - so you dont have to scroll to the bottom of the list.  Thats the way the old vnstat2 did it.

Thanks again for this package!

Myk

Offline MyKroFt

  • Jr. Member
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #4 on: July 07, 2016, 02:42:43 pm »
Ah no, I forgot about that. I haven't figured out a good way to save config options for this package just yet. I'll take another look at that as well.

one of my docker containers, rutorrent front end, saves selected columns, width, columns sortings etc via a json file that is save - maybe that is a simple option

or maybe something on the user/browser side?

Thanks
Myk

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 531
  • Karma: +121/-0
  • Web Dude
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #5 on: July 07, 2016, 02:52:42 pm »
On the daily stats, can we have to option to reverse the order, newest on top - so you dont have to scroll to the bottom of the list.

I'll see about reversing the table order for all of them. Also, possibly making it a sortable table.
« Last Edit: July 07, 2016, 02:57:44 pm by jdillard »

Offline virgiliomi

  • Sr. Member
  • ****
  • Posts: 486
  • Karma: +63/-4
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #6 on: July 07, 2016, 05:10:45 pm »
Installed 2.3.2 just for this... was going to try and wait until release, but now you did this. :)

So far in favor of all mentioned items... save default graph settings, sortable table, and most recent period at the top.

My comment is that it seems to be showing an average speed for the period rather than the actual amount of data. Maybe make that an option as well? Some people might care about the average speed for the period... but most are more interested in the actual amount of data transferred instead.

Additionally, it would be good to see vnstatd added to the Services widget on the dashboard, so we can make sure it's running and properly tracking traffic.

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 531
  • Karma: +121/-0
  • Web Dude
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #7 on: July 07, 2016, 05:23:00 pm »
My comment is that it seems to be showing an average speed for the period rather than the actual amount of data. Maybe make that an option as well? Some people might care about the average speed for the period... but most are more interested in the actual amount of data transferred instead.

What leads you to believe it is average? It should be totals.

Additionally, it would be good to see vnstatd added to the Services widget on the dashboard, so we can make sure it's running and properly tracking traffic.

It uses a cron job not vnstatd, I thought it would be more reliable. You can see the cron job if you install the cron package. I also haven't added the functionality that lets you change how often the cron job runs yet.

Offline virgiliomi

  • Sr. Member
  • ****
  • Posts: 486
  • Karma: +63/-4
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #8 on: July 07, 2016, 05:33:19 pm »
My comment is that it seems to be showing an average speed for the period rather than the actual amount of data. Maybe make that an option as well? Some people might care about the average speed for the period... but most are more interested in the actual amount of data transferred instead.

What leads you to believe it is average? It should be totals.
I've been watching a 5Mbps+ video stream for the past 45 minutes... yet for this hour (25 minutes so far), it's not showing anywhere near the amount of traffic showing it should be showing... Unless the numbers are really megabytes? The unit on the graph says "bits per second"... that's clearly not right.

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 531
  • Karma: +121/-0
  • Web Dude
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #9 on: July 07, 2016, 05:35:58 pm »
I believe I have the units represented wrong, it looks like it should be KiB/MiB/etc. Thanks for catching that!

Offline MyKroFt

  • Jr. Member
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #10 on: July 07, 2016, 05:41:33 pm »
ya, mine shows today aprox 10mb, old graph shows right at 9.xg

Myk

Offline virgiliomi

  • Sr. Member
  • ****
  • Posts: 486
  • Karma: +63/-4
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #11 on: July 07, 2016, 05:45:32 pm »
Ok, that's what screwed me up then. :)

As for cron versus service... It's not a big deal to me either way... I just wasn't sure how it was running. I did quickly pick up that it was updating every 5 minutes though.

Offline MyKroFt

  • Jr. Member
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #12 on: July 07, 2016, 05:55:13 pm »
Also on the side of the graphs - Traffic (Bits per Second) - does not work - its total traffic - no speed

Myk

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 531
  • Karma: +121/-0
  • Web Dude
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #13 on: July 07, 2016, 05:59:06 pm »
Yea, I think that was an artifact of using the Status > Monitoring as a starting point. I'll try and get some of these fixes in tomorrow.

Offline virgiliomi

  • Sr. Member
  • ****
  • Posts: 486
  • Karma: +63/-4
    • View Profile
Re: New Traffic Totals package available for testing
« Reply #14 on: July 07, 2016, 08:28:01 pm »
Just wondering about why PHP is listed as a dependency for the package. Isn't PHP part of the whole pfSense ecosystem anyway? Or is that for future planning if it goes away? Does this potentially cause problems if PHP is upgraded by pfSense core, but the package isn't updated to reflect the new version of PHP, when someone goes to install the package?