Use Event-Timestamp for Accounting Start/Stop with MySQL

Juri Glaß juri.glass at dai-labor.de
Mon Dec 20 14:33:03 CET 2010


Hi

I would like to write the Event-Timestamp from Accounting Start/Stop messages to my MySQL database instead of the server side time.

I tried to configure the dialup.conf, but it doesn't work properly.

I replaced %S with %{Event-Timestamp}, the result is "0000-00-00 00:00:00" in the database, the log file says :
expand:  UPDATE radacct SET acctstoptime = '%{Event-Timestamp}',   ** snip **  -> UPDATE radacct SET acctstoptime = 'Dec 21 2010 10:02:30 CET'  ** snip **

When I use something like DATE_FORMAT(date,format) from MySQL, the format string is somehow expanded. FROM_UNIXTIME isn't working either.

I understand that unix timestamps are printed as strings like 'Dec 21 2010 10:02:30 CET', but only for logging or for the sql statements too?

Thank you for your help.
Btw.: FreeRADIUS Version 2.0.4

Best
Juri






More information about the Freeradius-Users mailing list