rediswho and date timestamps

Mike Lopes mlopes at teksavvy.ca
Wed May 15 21:56:27 CEST 2019


Hi Alan,

> >
> > I'm in the process of updating our radius servers from 3.0.3 to 3.0.18 and I
> can't seem to get the unix timestamps into redis the way it is currently done.
> >
> > Currently my configuration is like this:
> >
> > start-insert = "LPUSH logs|%{User-Name} %{Event-Timestamp#}, ...
> 
>   I'm not sure that was ever intended to work.

Not sure either but that's how I found it in production...

> > Seems like that changed in the current version freeradius.  I've been over
> the documentation and read the configuration files to no avail.
> 
>   What changed?  What's going wrong?
> 

>From what you described above I think the way it was configured on my side wasn't intended to work so it's obvious to me now that it isn't supposed to work on the current versions of freeradius either which why I went and read docs and configuration files to find how to do it right.


> > I have tried to use date module, I have tried to use %S and %T from reading
> a few threads on this list but it keeps failing to convert into unix time..
> >
> > I've tried this in the preacct section:
> >
> > update request {
> >                        &Event-Timestamp := "%{date:%{Event-Timestamp}}"
> >                }
> >
> > Can someone point me to the # equivalent to get conversion to unix time?
> 
>   %l is unix time.
> 
>   You can use %{integer:Event-Timestamp} to get a "date" attribute
> converted to an integer.

I will try this thanks.

I guess I missed the %l because it wasn't clear enough for me on this page: https://wiki.freeradius.org/config/run_time_variables
That "request timestamp" meant unix time next to %l

> 
>   For more information, see https://wiki.freeradius.org/config/Xlat
> 
>   Alan DeKok.
> 
> 

Thanks again for quick response.

-Mike

> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list