Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Vnstat2 Package Updated - Report/Feedback problems here.

    Scheduled Pinned Locked Moved pfSense Packages
    39 Posts 13 Posters 7.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pyrodex
      last edited by

      @bryan.paradis:

      @pyrodex:

      Data is logging but when accessing the VNstat2 front-end via the gui I get a 404 error. The link is http://firewall/vnstat2..

      On the main vnstat2 page in the pfsense GUI have you  check marked "Enable vnstat php frontend (Note that no login will be needed)" then pressed save?

      That was weird, I had it toggled but turned it off and on and fixed it.

      1 Reply Last reply Reply Quote 0
      • E
        Eurisko
        last edited by

        I installed it, however, when I try to hit the PHP frontpage for it, I get the following message:

        Notice: Undefined index: totalrx in /usr/local/www/vnstat2/index.php on line 81 Notice: Undefined index: totalrxk in /usr/local/www/vnstat2/index.php on line 81 Notice: Undefined index: totaltx in /usr/local/www/vnstat2/index.php on line 82 Notice: Undefined index: totaltxk in /usr/local/www/vnstat2/index.php on line 82

        Tried reinstalling, and also uninstalling/reinstalling. Running 2.1

        Update: I waited a few minutes, clicked around on the page with the error, the error went away, and now it just works. Can't reproduce the error again. Life is good.

        1 Reply Last reply Reply Quote 0
        • B
          bryan.paradis
          last edited by

          @Eurisko:

          Update: I waited a few minutes, clicked around on the page with the error, the error went away, and now it just works. Can't reproduce the error again. Life is good.

          Ok great! Maybe it was just a cached page? You had it installed before and it was broken?

          @Cino:

          I was able to install it just a few minutes ago and so far so good… I'll do another install later tomorrow to make sure... My old data is still there and displaying.. Thank you very much for taking the time to fix this... I knew my bandaids wouldn't last for long ;-)

          I been using band-aides forever on this package! :)

          @johnpoz:

          So package installed fine, now I had used the old patch method, etc.. etc.  Think the data was in a different dir?  When I installed the package now it seems to have worked.  I will just have to clear out some data from 2012 ;)

          July 2012  88.33 MB  15.32 MB  103.65 MB

          Prob last time the old package worked without manual intervention.  Will clear out my data and see how it goes.

          But looks working sofar to me - THANK YOU!!!  This has been long overdue, and you are a HERO!!

          edit:  Ok cleaned the dbs and now looks good, looking forward to seeing data fill in.  Again Thank you!!!

          Should be same folder still for the db. Did you have another db that was more current in a custom place? Glad it is working for you!

          @serialdie:

          I just upgraded mine on pfsense 2.1-RELEASE x86_64. All well so far.
          Will report back.

          Good news! Thanks for the feedback.

          @pyrodex:

          That was weird, I had it toggled but turned it off and on and fixed it.

          Could have been still waiting for data or something was cached. It is continuously updated via a cronjob that runs every minute. Glad it is now working.

          @bob_v_b:

          Thank you! Last night, the package would not install. Today, it installed perfectly.
          Keep up the great work!

          Glad to hear! Thanks for the feedback

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            "Should be same folder still for the db. Did you have another db that was more current in a custom place? Glad it is working for you!"

            Yeah I had hobbled together it working before, had to edit the config by hand every time updated pfsense, run a patch, etc.  The data was in a different folder, so looks like you had used the older data folder from when the packaged worked - and had some data in there from way back 2012 ;)

            The data was not really of any importance - just cleaned up the databases and looks to be logging fine now.  So looks all good to me - thanks again this has been a long time coming for sure.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • B
              bryan.paradis
              last edited by

              @johnpoz:

              "Should be same folder still for the db. Did you have another db that was more current in a custom place? Glad it is working for you!"

              Yeah I had hobbled together it working before, had to edit the config by hand every time updated pfsense, run a patch, etc.  The data was in a different folder, so looks like you had used the older data folder from when the packaged worked - and had some data in there from way back 2012 ;)

              The data was not really of any importance - just cleaned up the databases and looks to be logging fine now.  So looks all good to me - thanks again this has been a long time coming for sure.

              Ok! You could probably just transplant the DB but back up other one first. Either way! Yeah its been broken for a long time.

              1 Reply Last reply Reply Quote 0
              • S
                Swyman18
                last edited by

                Hi,

                Sorry if this is a known issue, I noticed that the HOURS page is not distinguishing between AM and PM, everything is PM.

                For example,

                2P - 3P 327.22 MB 7.65 MB 334.87 MB
                1P - 2P 33.21 MB 10.56 MB 43.77 MB
                12P - 1P 20.08 MB 8.45 MB 28.53 MB
                11P - 12P 29.58 MB 11.32 MB 40.90 MB
                10P - 11P 19.75 MB 5.78 MB 25.53 MB

                pFsense release version: 2.1
                pFsense architecture: amd64
                pFsense filesystem: full
                pFsense status: fresh install
                Did you have vnstat installed before? No

                vnstat_find.txt

                1 Reply Last reply Reply Quote 0
                • B
                  bryan.paradis
                  last edited by

                  @Swyman18:

                  Hi,

                  Sorry if this is a known issue, I noticed that the HOURS page is not distinguishing between AM and PM, everything is PM.

                  For example,

                  2P - 3P 327.22 MB 7.65 MB 334.87 MB
                  1P - 2P 33.21 MB 10.56 MB 43.77 MB
                  12P - 1P 20.08 MB 8.45 MB 28.53 MB
                  11P - 12P 29.58 MB 11.32 MB 40.90 MB
                  10P - 11P 19.75 MB 5.78 MB 25.53 MB

                  pFsense release version: 2.1
                  pFsense architecture: amd64
                  pFsense filesystem: full
                  pFsense status: fresh install
                  Did you have vnstat installed before? No

                  Thanks for including the information. Looks a bug. I will have a look into it.

                  1 Reply Last reply Reply Quote 0
                  • B
                    bryan.paradis
                    last edited by

                    Had a look and I think this is the offending line. You can fix this by editing /usr/local/www/vnstat2/lang/en.php

                    %P doesn't seem to be supported on Freebsd. replace with %p instead or %H:%M for 24h. Examples below

                    %P not supported by strftime on Freebsd

                    
                    $L['datefmt_hours'] = '%l%P';
                    
                    

                    Corrected line with the space

                    
                    $L['datefmt_hours'] = '%l%p';
                    
                    

                    Or if your want 24h format instead

                    
                    $L['datefmt_hours'] = '%H:%M';
                    
                    

                    Forked, edited and created a pull request to fix this for all languages as well as update French time to 21h00 format. You can see the pull request here for the vnstat_php_frontend git. I will roll in an update with the rest of the languages and some other misc fixes at a later time

                    1 Reply Last reply Reply Quote 0
                    • S
                      Swyman18
                      last edited by

                      Easy enough fix, thank you!

                      1 Reply Last reply Reply Quote 0
                      • B
                        bryan.paradis
                        last edited by

                        @Swyman18:

                        Easy enough fix, thank you!

                        No problem. Ill try to throw in a language select as well as at least fix this issue. Not going to happen until later this weekend though!

                        1 Reply Last reply Reply Quote 0
                        • C
                          chasba
                          last edited by

                          Thank you for updating the package. Works great :)

                          Just a heads up: you can grab version 1.5.2 from his github page, https://github.com/bjd/vnstat-php-frontend

                          I've been running it for a good while now without issues.

                          1 Reply Last reply Reply Quote 0
                          • B
                            bryan.paradis
                            last edited by

                            @chasba:

                            Thank you for updating the package. Works great :)

                            Just a heads up: you can grab version 1.5.2 from his github page, https://github.com/bjd/vnstat-php-frontend

                            I've been running it for a good while now without issues.

                            Thanks for the feedback! I am aware of the git I have an open pull request to fix hour format currently :)

                            1 Reply Last reply Reply Quote 0
                            • D
                              doktornotor Banned
                              last edited by

                              Can you make a checkbox to make the stats persistent across reboots on nanobsd, please?  ;)

                              1 Reply Last reply Reply Quote 0
                              • B
                                bryan.paradis
                                last edited by

                                @doktornotor:

                                Can you make a checkbox to make the stats persistent across reboots on nanobsd, please?  ;)

                                Your saying that the database is not persistant on nanobsd? Was it persistant before?  Can you please give more information including what is asked in my first post

                                1 Reply Last reply Reply Quote 0
                                • D
                                  doktornotor Banned
                                  last edited by

                                  @bryan.paradis:

                                  Your saying that the database is not persistant on nanobsd?

                                  Yes.

                                  @bryan.paradis:

                                  Was it persistant before?  Can you please give more information including what is asked in my first post

                                  No idea, never have been able to install the package before. Latest nanobsd i386 2.1.1 snapshot.

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bryan.paradis
                                    last edited by

                                    @doktornotor:

                                    @bryan.paradis:

                                    Your saying that the database is not persistant on nanobsd?

                                    Yes.

                                    @bryan.paradis:

                                    Was it persistant before?  Can you please give more information including what is asked in my first post

                                    No idea, never have been able to install the package before. Latest nanobsd i386 2.1.1 snapshot.

                                    I just threw together a fresh install of nanobsd amd64 2.1 and it works fine and is persistent.

                                    You will have to provide much more information:

                                    1. ls -a /conf/vnstat and find / -name *vnstat* Before and After reboot
                                    2. More information of what exactly isn't working or even a picture
                                    3. Can you confirm no errors on package install?
                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bryan.paradis
                                      last edited by

                                      https://github.com/pfsense/pfsense-packages/pull/607

                                      AM/PM Time fix pull request.

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        tester_02
                                        last edited by

                                        Bryan…

                                        I just wanted to say thanks for the fixed package.  It's much appreciated and works well.

                                        THANK YOU!!

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          bryan.paradis
                                          last edited by

                                          @tester_02:

                                          Bryan…

                                          I just wanted to say thanks for the fixed package.  It's much appreciated and works well.

                                          THANK YOU!!

                                          Glad it is working well for you! Thanks for the feedback.

                                          1 Reply Last reply Reply Quote 0
                                          • P
                                            petzi
                                            last edited by

                                            Hello,

                                            work just fine so far; but after a renew dyn-dns I got from cron the message:

                                            Subject: Cron root@pfsense/usr/local/pkg/vnstat2/vnstat2.sh

                                            X-Cron-Env: <shell= bin="" sh="">X-Cron-Env: <path= etc:="" bin:="" sbin:="" usr="" sbin="">X-Cron-Env: <home= var="" log="">X-Cron-Env: <logname=root>X-Cron-Env: <user=root>Error: Unable create database backup "/conf/vnstat/.vr0".
                                            Error: Unable create database backup "/conf/vnstat/.vr1".
                                            Error: Unable create database backup "/conf/vnstat/.ath0_wlan1".
                                            Error: Unable create database backup "/conf/vnstat/.vr2".

                                            I'm using nanobsd on alix 2d3. It can't create since the root-fs it mounted ro.

                                            Thanks,</user=root></logname=root></home=></path=></shell=>/root@pfsense

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.