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

    Make radius.log visible in webGUI like STATUS -> System Logs. php question

    Scheduled Pinned Locked Moved pfSense Packages
    14 Posts 4 Posters 12.3k 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.
    • marcellocM
      marcelloc
      last edited by

      Nachtfalke,

      If freeradius uses syslog facilities, you may need to include it in /etc/syslogd.conf

      take a look at postfix.inc file.

      att,
      Marcello Coutinho

      Treinamentos de Elite: http://sys-squad.com

      Help a community developer! ;D

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        Hi,

        thanks for your reply.

        I can change if freeRADIUS logs it files to /var/lag/radius.log or to syslog. But when logging to syslog then it saves all logs in /var/log/system.log I would like to redirect it to another file so that I could create a different tab only for radius logs.

        But I will have a look at the postfix.inc.
        Thank you.

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          that's the point.

          If freeradius is able to write to syslog daemon and you include a syslog facility 'radius', you will be able to log to radius.log using syslog.

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

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

            I don't recall the specific details of how it works, but there is Diagnostics > Package Logs that is made for packages to hook into this way.

            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
            • N
              Nachtfalke
              last edited by

              I played around with "diag_pkglogs.php" because I found that arpwatch is logging there.
              I am no coding pro so I just replaced "arpwatch" with "radius" and so on but didn't work.

              Not sure if it is enough to add

               <logging><facilityname>freeRADIUS</facilityname>
              <logfilename>radius.log</logfilename></logging> 
              

              to the config.xml or if there is more to do. Didn't want to add it because I do not want to break the package (again).

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

                That doesn't get added to config.xml directly, it's part of the package definition in pkg_config.8.xml and such. There are several packages that have it set there. Not sure how well it works, if it works at all, but others are doing it.

                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
                • W
                  wagonza
                  last edited by

                  It works perfectly. This is what I used for the Unbound package

                  
                   <logging><facilityname>unbound</facilityname>
                    <logfilename>unbound.log</logfilename>
                    <logtab>Unbound</logtab></logging> 
                  
                  

                  You can then view it via Status->Package Logs. So just modify the above to suit your needs.

                  Follow me on twitter http://twitter.com/wagonza
                  http://www.thepackethub.co.za

                  1 Reply Last reply Reply Quote 0
                  • N
                    Nachtfalke
                    last edited by

                    Hi, I added this to the pkg.config.8.xml.amd64

                     <logging><facilityname>freeradius</facilityname>
                      <logfilename>radius.log</logfilename>
                      <logtab>freeRADIUS</logtab></logging> 
                    

                    There is no tab in "Package logs" and of course no logging.

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

                      Did you reinstall the package after that was added? When you do, it will end up in config.xml but as a part of the <package>tag for it.

                      (Also make sure you wait for ~10 minutes after the commit actually was approved so the package repo has a chance to sync up the new commits)</package>

                      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
                      • W
                        wagonza
                        last edited by

                        Have you configured freeRADIUS to log to syslog and ensure it starts up with the syslog options?

                        Dont forget to update pkg.config.8.xml as well, so i386 also gets some logging love.

                        Follow me on twitter http://twitter.com/wagonza
                        http://www.thepackethub.co.za

                        1 Reply Last reply Reply Quote 0
                        • N
                          Nachtfalke
                          last edited by

                          This is in /etc/syslog.conf

                          !freeradius
                          *.*                                              %/var/log/radius.log
                          
                          

                          The process name of freeradius is "radiusd" should this be in syslog.conf instead of "freeradius" ?

                          to change between logging to "radius.log" or to "syslog" I only have to change one line in freeradius.inc which effects /usr/local/etc/raddb/radiusd.conf

                          /var/log/radius.log

                          logdir = /var/log
                          

                          syslog:

                          logdir = syslog
                          
                          1 Reply Last reply Reply Quote 0
                          • W
                            wagonza
                            last edited by

                            did you get this working?

                            Follow me on twitter http://twitter.com/wagonza
                            http://www.thepackethub.co.za

                            1 Reply Last reply Reply Quote 0
                            • N
                              Nachtfalke
                              last edited by

                              Sorry I didn't.
                              For me it seems like the output in the radius.log file in /var/log isn't in the correct format to make it visible in GUI.

                              As an example I copied system.log to radius.log and than it was visible in GUI (Package Logs). But I don't know how to fix it. I still have to less coding skills to make this work.

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