Vnstat2 dead with pFsense 2.3 upgrade :(



  • I am very disappointed to learn that vnstat2 is not supported in the 2.3 release. Does anyone know if there are plans to upgrade this to work with 2.3? If not, is anyone interested in being commissioned to make it work with 2.3?



  • It's among the packages that were waiting for release to be completed before being ported to the new package format. Like NUT and others that didn't make the release cut, I'm sure it will make the transition eventually. And just like NUT, there were a number of people asking for vnstat to be converted while 2.3 was in the beta phase, so the developers know it's a desired package.



  • It's the only way I have been able to keep track of monthly bandwidth.
    For all the great things pfsense does, it can't do some of these basics tasks you would think it does.



  • @virgiliomi:

    It's among the packages that were waiting for release to be completed before being ported to the new package format. Like NUT and others that didn't make the release cut, I'm sure it will make the transition eventually. And just like NUT, there were a number of people asking for vnstat to be converted while 2.3 was in the beta phase, so the developers know it's a desired package.

    Thanks for the reply - do you have any information on who the developer is? I tried reaching out to vnstat directly but they have no knowledge of the pFsense upgrade.



  • I mean one of the pfSense developers, not the vnstat developer.

    Or whoever created the package for pfSense originally… if they happen to still be around (though if they are, they could've been working on that for a while now).



  • I haven't tried 2.3 yet othen than install it on a vm, but you probably could manaully install the vnstat2 freebsd package. It wont be intergrated into pfSense like the current 2.2.x one but it should still work. There is a writeup on the forum before the pfSense package was created to give you an idea. Of course this wouldn't be supported at all until an offical package is created.



  • Add my support for vnstat2 to make it back into 2.3



  • BTW, apparently I was mistaken in my previous statement, and the only package not yet ported that the pfSense developers definitely plan to port is NUT; other packages depend on how broken they might be, and how much work would be involved to convert the package over. Their resources are limited, and they already have a sizable list of things to be fixed/improved upon in pfSense 2.3.1.

    Dev post about package porting: https://forum.pfsense.org/index.php?topic=109835.msg611555#msg611555

    Developing thread on manual vnstat installation: https://forum.pfsense.org/index.php?topic=109335.0



  • I don't think most of us that like vnstat are really stuck on vnstat itself.  It's just that vnstat is the only way in pfsense that we can easily track the monthly usage.  it also is nice enough to let us cycle the month on a specific day like most ISP's do. 
    If there was another way to do this easily, i would dump vnstat.    It was just so easy and simple and worked.
      I was always hoping it would make it to the core PFsense somewhere in the graphics/logs.  I still think it should be the part of the base tools for any router. vnstat always seemed like a hack addon instead of being part of core.

    For now I am waiting on the upgrade until this need is completed.  If someone comes up with a bounty, count me in for support.



  • After another post in the other "DIY vnstat" topic, the lightbulb turned on about why vnstat isn't likely on the list to be ported… because of its reliance on php-gd, and all of the dependencies that IT carries along. Those are all packages that would need to be maintained in the pfSense package repository... not likely something the developers want to worry about if they don't have to.

    SO... I found a javascript-based interface for vnstat. It still serves via a single PHP page, along with some CSS and JS script files, but it looks like graphs and whatnot are done client-side through javascript instead (at least no mention of php-gd being a requirement). The link is in the other topic.


  • Administrator

    The "vnStat package" is almost back in it's newer form: https://github.com/pfsense/FreeBSD-ports/commit/a9b4ece25c8f472fba250ed671533305bf884302

    a couple more tweaks and it should show up in the Available Packages list



  • @jdillard:

    The "vnStat package" is almost back in it's newer form: https://github.com/pfsense/FreeBSD-ports/commit/a9b4ece25c8f472fba250ed671533305bf884302

    a couple more tweaks and it should show up in the Available Packages list

    Sweetness! Do you have any screenshots by chance?  I was able to get vnstat up and running a while back but im only using the original web interface, not the pages that were created for the pfSense package.


  • Administrator

    This one is 22 days old, but gives you an idea: https://imgur.com/GqvihFX



  • prudy!!! I'm assuming its using the vnstat db? If so, I should be able to copy over my existing db to use in the new interface? I have a years worth of data


  • Administrator

    Yes it just uses the vnstat –json output. In theory you could, it's worth a shot on a VM.



  • Woot! patience is paying off! :)



  • ok i am on 2.3.2-DEVELOPMENT (amd64)
    built on Thu Jun 23 12:33:12

    how do i access this ?

    ok got it


  • Administrator

    for some reason the builder isn't picking it up, still trying to figure that out. but it's the last step to getting it in snapshots.



  • WARNING

    Just installed this new package today - I had vnstat manually running - It wipes out any databases

    Make a backup 1st so you can restore backup and get your history back

    Otherwise it looks good so far

    Is there a html link that can viewed outside of the pfsense ui like the old vnstat2 could?

    Thanks for the work
    Myk


  • Administrator

    Were you able to get your history back? I store the database files in /var/db/vnstat and your db files from running manually are likely in /var/lib/vnstat/. It might be possible to copy/move them over.

    @MyKroFt:

    Is there a html link that can viewed outside of the pfsense ui like the old vnstat2 could?

    No there is not.



  • @jdillard:

    Were you able to get your history back? I store the database files in /var/db/vnstat and your db files from running manually are likely in /var/lib/vnstat/. It might be possible to copy/move them over.

    @MyKroFt:

    Is there a html link that can viewed outside of the pfsense ui like the old vnstat2 could?

    No there is not.

    ok, will leave the old vnstat2 page intact since I already have its dependencies installed and working so I can view that html page from outside my lan

    as far as the databases they where there in /var/lib/vnstat - I also exportdb and a daily status at 12am as I have had both db and back db in the past get corrupted for some reason.

    Thanks
    Myk


  • Administrator

    Thanks, MyKroFt.

    I created a feedback thread in the snapshots board if anyone else wants to give feedback: https://forum.pfsense.org/index.php?topic=114753.0



  • How do I get the package? It doesn't show up under "Available Packages"  ???
    I'm currently on 2.3.1_5.



  • have to be on the developer update branch to see it

    Myk



  • Ah, I see. I tried the latest snapshot earlier tonight, but I lost the access to the package manager for some reason, so I went back to 2.3.1_5.



  • ya there was a problem there, it was fixed later in the day yesterday

    Developer is all fixed now for package manager etc

    Myk



  • Thanks for the quick reply. I think I'll wait for the package to make its debut in a stable build. I'm too much of a novice to be messing around with dev builds  :P


  • Administrator

    MyKroFt, would you mind sharing your db sizes and when they were created (how long they have been collecting data)? I'm just curious about how big the files get with time for people running the embedded image.