Linelog Event-Timestamp format

rocky marciano cartelluminoso at gmail.com
Fri Sep 23 18:06:39 CEST 2016


Alan,

Im using 3.0.11 version. You are right, it gives me the integer value of
the attribute, in my case the NAS sends a unix timestamp in attribute
"Event-Timestamp" so when the linelog module dump that attribute to the CSV
as an integer the value corresponds to the unix timestamp value.

What im trying to do is to convert the unix timestamp in the
"Event-Timestamp" attribute that the NAS sends to a specific human readable
format in the CSV file. By default, when i configure %{Event-Timestamp} in
linelog it dumps in the CSV the time with this format "Sep 10 2016
16:07:48", when i configure in linelog %{integer:Event-Timestamp} it dumps
in the CSV the time as a integer, is there a way to tell linelog to dump in
the CSV file the time with this format "09.10.2016 16:07:48"??

Thanks.

On Fri, Sep 23, 2016 at 1:00 PM, rocky marciano <cartelluminoso at gmail.com>
wrote:

> Alan,
>
> Im using 3.0.11 version. You are right, it gives me the integer value of
> the attribute, in my case the NAS sends a timestamp in attribute
> "Event-Timestamp" so when the linelog module dump that attribute to the CSV
> as an integer the value corresponds to the timestamp value.
>
> What im trying to do is to convert the timestamp in the "Event-Timestamp"
> attribute that the NAS sends to a specific human readable format in the CSV
> file. By default, when i configure %{Event-Timestamp} in linelog it dumps
> in the CSV the time with this format "Sep 10 2016 16:07:48", when i
> configure in linelog %{integer:Event-Timestamp} it dumps in the CSV the
> time as a integer, is there a way to tell linelog to dump in the CSV file
> the time with this format "09.10.2016 16:07:48"??
>
> Thanks.
>
>
> On Fri, Sep 23, 2016 at 11:54 AM, Alan DeKok <aland at deployingradius.com>
> wrote:
>
>> On Sep 23, 2016, at 10:47 AM, rocky marciano <cartelluminoso at gmail.com>
>> wrote:
>> >
>> > I've tried that yet, and gives me the date in a timestamp format.
>>
>>   No, it doesn't.
>>
>>   Either the code works, and gives you the integer date. Or, it
>> complaints that "%{integer}" isn't supported.
>>
>>   Which version are you running?
>>
>>   Did you restart the server after making the configuration change?
>>
>>   Alan DeKok.
>>
>>
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/list
>> /users.html
>>
>
>


More information about the Freeradius-Users mailing list