Make radius.log visible in webGUI like STATUS -> System Logs. php question
-
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.
-
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).
-
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.
-
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.
-
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.
-
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>
-
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.
-
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
-
did you get this working?
-
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.