Identify the site in logging
Hello, We have a need to be able to identify the virtual-server that is generating the log messages. How would you approach this? - Is there a way to get a different logging configuration per server? - Is there a way to add the server name in logging statements? We are not too sure of how to proceed. Thanks for your guidance. -- *Stephane Bourque* *CEO & Founder* *Arilia Wireless Inc.* *"Everything connected"* stephane.bourque@arilia.com +1(778)558-3524 *www.arilia.com <http://www.arilia.com>*
On Oct 24, 2023, at 12:24 PM, Stephane Bourque <stephane.bourque@arilia.com> wrote:
We have a need to be able to identify the virtual-server that is generating the log messages. How would you approach this?
There is an automatically generated attribute called Virtual-Server. It contains the name of the current virtual server.
- Is there a way to get a different logging configuration per server?
That's not possible, sorry.
- Is there a way to add the server name in logging statements?
You can edit the "log" section of radiusd.conf. Look at the messages there, and add a %{Virtual-Server} expansion. Alan DeKok.
Thanks Alan for the quick response. I tried and I was able to append the server to the Login OK line in the logs. Do you know if it is possible to change the format of the Login OK line? I can't seem to find that format in the mods-config or enabled.
From the comments in the .conf file, it seems we can only append something.
Thanks again. On Tue, Oct 24, 2023 at 10:23 AM Alan DeKok <aland@deployingradius.com> wrote:
On Oct 24, 2023, at 12:24 PM, Stephane Bourque < stephane.bourque@arilia.com> wrote:
We have a need to be able to identify the virtual-server that is generating the log messages. How would you approach this?
There is an automatically generated attribute called Virtual-Server. It contains the name of the current virtual server.
- Is there a way to get a different logging configuration per server?
That's not possible, sorry.
- Is there a way to add the server name in logging statements?
You can edit the "log" section of radiusd.conf. Look at the messages there, and add a %{Virtual-Server} expansion.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 24/10/2023 19:05, Stephane Bourque wrote:
Do you know if it is possible to change the format of the Login OK line? I can't seem to find that format in the mods-config or enabled.
From the comments in the .conf file, it seems we can only append something.
If you want something more complicated then you probably want to look at using the linelog module. Then you can write custom log lines with whatever you want. -- Matthew
participants (3)
-
Alan DeKok -
Matthew Newton -
Stephane Bourque