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

    Getting vnstat2 to work with pfSense 2.2

    Scheduled Pinned Locked Moved pfSense Packages
    11 Posts 6 Posters 2.0k 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.
    • W
      wwp98072
      last edited by

      To get vnstat2 to work with the new 2.2 release, I had to do the following

      • mkdir -p /var/lib/vnstat

      • install vnstat2

      • edit /usr/local/www/vnstat2/config.php

      Inside config.php I had to change the $iface_list array to be the name of my LAN interface and the GUI started to work.

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

        tried it on a test box and it worked for me.

        Any chance the package can be updated to work without this workaround?

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          I pushed some fixes today. Should be fine now without manual changes.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • M
            mir
            last edited by

            I can confirm the latest package works as expected.

            Thank's for your effort.

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

              Woohooo!!!

              Thanks Jimp!!

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

                While the new update makes vnstat work, the old data is lost.

                Any chance there is a way to migrate the data, or at least not lose the data when it does the update?  I hate to lose my data.  I had to switch back to 2.1.5.  If there is no way, then I have to wait till next month's billing cycle.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  As far as I can see they put the data in the same place (/conf/vnstat/<nic_name>/), same with the new as the old. I didn't have any old data so I can't say why it might not have converted. Both 2.1.x and 2.2 use the same vnstat code so if you have the same vnstat on both then perhaps some other difference made the data change in some way or become invalid.</nic_name>

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

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

                    Did you change arch by chance? I've upgraded my box many times over the years with no major issues to vnstats data (always back it up in case it gets deleted). I went from 2.1.5 i386 to 2.2 amd64 and couldn't reuse my previous vnstat data. I'm ok with it since I knew it would be a risk because of arch change.

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      Another possibility is that your upgrade changed the NICs, for example on Xen the NIC names could have changed from, say, re0 to xn0. Renaming the database dirs in /conf/vnstat would fix that.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

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

                        No change to arch.  Machine is a VM, if there is a NIC change it's not my doing.

                        I'll give it another try and hopefully this and squidguard will work again.  Once a week I try to upgrade to 2.2 in hopes the packages upgrade. :)

                        1 Reply Last reply Reply Quote 0
                        • A
                          anzak84
                          last edited by

                          error install vnstat pfsense  (vnstat1.12.6  )http:// x.x.x./vnstati.php

                          vnstat.jpg
                          vnstat.jpg_thumb

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