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

    Pfsense and ISP billing (data monitoring)

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    16 Posts 8 Posters 19.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.
    • Z
      Zorac
      last edited by

      minor bug update, mostly for allowing for what happens if for whatever reason your pfsense box crashes/freezes.

      otherwise exactly the same as described in my second post

      wanstats_maint.php.txt
      wanstats.php.txt
      wanstats_uninstall.php.txt
      wanstats.inc.txt
      wanstats.xml.txt
      wanstats_install.php.txt
      wanstats_rec.php.txt

      1 Reply Last reply Reply Quote 0
      • 8
        80286
        last edited by

        This is SUPER FANTASTIC. Quarter of a million dollar script! Definitely should come with pfSense by DEFAULT!!!
        Thank you for your great work!!!

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

          Somehow I missed this thread before, but caught it when it was linked from another thread.

          It shouldn't be too hard to turn this into a proper package. I thought about making one like this myself, even. I'll see if I can get it in the repo.

          EDIT: A couple suggestions:  The name should be more general, and you should be able to choose the interface. Otherwise it's not much use to those of us with multi-wan or those who want to use it on internal interfaces. Even something like "Bandwidth Totals" would be good.

          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
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            After looking deeper at the files you have, it does look like it would be quite a bit of work to make that into a package.

            Much of the things you have done could be automated or handled for you by using the package system's functionality, though.

            You might want to download the package repository and look at how some other packages work.

            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
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              Try the new RRD Summary package I just put up, it should produce similar output using only the data which exists in the RRDs.

              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
              • Z
                Zorac
                last edited by

                @jimp:

                After looking deeper at the files you have, it does look like it would be quite a bit of work to make that into a package.

                Much of the things you have done could be automated or handled for you by using the package system's functionality, though.

                You might want to download the package repository and look at how some other packages work.

                easy to change the interface, but your right, a fair amount of coding woud be involved to monitor multiple interfaces.

                i looked at the package repository, but i didnt want to have to set up a server to get it all going, maybe ill give it another try, although with your simple rrd script, not sure if thats necessary anymore!

                i did run into problems in the past with rrd though, where it didnt match what my ip was saying i was doing, out by about 10%, but using scripting using ifstats matched fine, which was one reason i went the way i did

                1 Reply Last reply Reply Quote 0
                • D
                  doctorjbeam
                  last edited by

                  This is exactly the type of package I'm after. The RRD Summary package only shows you usage from the current month - eg, my usage period starts on the 15th of each month, so if I wanted to view July 15th - August 15th I can't do it :) ISP Billing looks exactly perfect.

                  Any chance we can see this functionality appear in pfSense anytime soon, either as the ISP Billing package or get RRD Summary fleshed out a bit more? :)

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

                    RRD Summary lets you pick the start date as well as shows you both the current and prior months. You should be able to do exactly what you want with it.

                    It's already in 2.0.

                    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
                    • _
                      _igor_
                      last edited by

                      Is there anything new with this package? Saw it this days and would like it as a package!

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

                        Zorac,  I just installed your package, and it works very well!  Just a suggestion:  maybe some graphing and the possibility to setup a periodic (monthly, weekly, etc) cap and send a notification (email, network message, etc) if the cap is almost reached/has been reached?

                        What do you think?

                        Also, I was setting up the package before use, and I noticed this:

                        Data Backup:  Data is saved to the /tmp directory, which means in an improper shutdown, data can be lost, this option will use cron to back up the data to the phyiscal media on a daily basis so no more than 1 day of data can ever be lost due to improper shutdown.

                        What does physical media means?  Can we change the location where it stores the backup?  I'd rather have this on the pfsense box harddrive…  Also, can we change the backup frequency?  Instead of daily, maybe ervery 4 hours or so?  My bandwidth can change very rapidly.  Within a few hours, it can go up by several GB's...

                        Thanks!

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

                          The application failed.  After several weeks working properly it stopped recording several days ago and I've lost track of my bandwidth for good.

                          Any idea why suddenly it stopped working?

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