Event-Timestamp issue when reading a detail file
Aleš Rygl
ales at rygl.net
Sat May 18 19:23:55 UTC 2024
Hello,
I would like to kinldy ask for an help with following issue. I am
running Freeradius 3.2.3+dfsg-2+b4 (Debian package) and have following
problem. I receive Radius Accounting and put it into a a detail files.
Then I have a detail file reader which stores Accounting records to DB.
I have noticed a weird thing related to timestamp of the records. All
records are inserted to DB with +1 hour offset. The attribute
Event-Timestamp is logged correctly - when grepping detail files for the
Event-Timestamp , it is fine, no offset.
When I start Freeradius in debug mode, I can see that the packet is
received as follows:
(3848) Received Accounting-Request Id 254 from 10.49.17.160:38050 to
10.49.17.164:1813 length 637
(3848) User-Name = "xxx"
(3848) NAS-IP-Address = 10.49.32.254
(3848) NAS-Port = 793003
(3848) Service-Type = Framed-User
(3848) Framed-Protocol = GPRS-PDP-Context
(3848) Framed-IP-Address = 100.81.87.87
(3848) Framed-MTU = 1500
(3848) Called-Station-Id = "internet"
(3848) Calling-Station-Id = "xxx"
(3848) NAS-Identifier = "rzt-gw2"
(3848) Acct-Status-Type = Start
(3848) Acct-Session-Id = "591800FA15580ABD"
(3848) Acct-Authentic = RADIUS
(3848) Acct-Multi-Session-Id = "591800FA15580ABB"
(3848) Event-Timestamp = "May 16 2024 21:32:59 CEST"
.
The same req. taken from the detail file in debug mode has the
Event-Timestamp shifted by 1h!
detail
(/srv/radius/freeradius_01/radacct/detail.mobile_v3/queue-30/detail-*):
Read packet from
/srv/radius/freeradius_01/radacct/detail.mobile_v3/queue-30/detail.work
User-Name = "xxx"
NAS-IP-Address = 10.49.32.254
NAS-Port = 793003
Service-Type = Framed-User
Framed-Protocol = GPRS-PDP-Context
Framed-IP-Address = 100.81.87.87
Framed-MTU = 1500
Called-Station-Id = "internet"
Calling-Station-Id = "xxx"
NAS-Identifier = "rzt-gw2"
Acct-Status-Type = Start
Acct-Session-Id = "591800FA15580ABD"
Acct-Authentic = RADIUS
Acct-Multi-Session-Id = "591800FA15580ABB"
Event-Timestamp = "May 16 2024 22:32:59 CEST"
.
Event-Timestamp with 1 hour offset is also inserted to DB. Here I use
FROM_UNIXTIME(%{integer:Event-Timestamp}).
I am running this setup on another machine for more than 3 years with
Freeradius 3.0.13+git and there is nothing like that. I can see it with
3.2.3+dfsg-2+b4 and also 3.2.1+dfsg-4+deb12u1 (Bookworm default). NAS
and Freeradius are both in Europe/Prague (CEST, +0200), timezone is set
correctly, time in sync.
Thanks
Ales
More information about the Freeradius-Users
mailing list