Import to MySQL from Flat Files

Tim Sylvester tim.sylvester at networkradius.com
Tue Aug 10 17:33:44 CEST 2010


One option is to configure FR to be a detail file reader which will import
the files and can write them to the database. Start by looking at the
decoupled-accounting file in the sites-available directory. It shows how to
setup a detail file reader.

 

Tim

 

From:
freeradius-users-bounces+tim.sylvester=networkradius.com at lists.freeradius.or
g
[mailto:freeradius-users-bounces+tim.sylvester=networkradius.com at lists.freer
adius.org] On Behalf Of Gabriel Marais
Sent: Tuesday, August 10, 2010 8:13 AM
To: freeradius-users at lists.freeradius.org
Subject: Import to MySQL from Flat Files

 

Hi Guys

 

I was wondering if there was any "easy" way to import the accounting packets
recorded in the flat files located at /var/log/freeradius/radacct into a
MySQL database...

 

My entries in the flat files looks like this (entry stripped) :-

Wed Jul  7 22:37:39 2010

        NAS-IP-Address = x.x.x.x

        NAS-Identifier = "rbggs2"

        Called-Station-Id = "xxxxxx"

        Framed-Protocol = GPRS-PDP-Context

        Service-Type = Framed-User

        NAS-Port-Type = Virtual

        NAS-Port = xxxxxx

        Calling-Station-Id = "xxxxxx"

        Acct-Status-Type = Stop

        Framed-IP-Address = 10.0.1.46

        Acct-Session-Id = "29D015A2275DA802"

        User-Name = "xxxxxx"

        Acct-Input-Octets = 7453

        Acct-Output-Octets = 5195

        Acct-Input-Packets = 108

        Acct-Output-Packets = 53

        Acct-Terminate-Cause = User-Request

        Acct-Authentic = RADIUS

        Acct-Delay-Time = 0

        3GPP-PDP-Type = 0

        3GPP-SGSN-Address = x.x.x.x

        3GPP-GGSN-Address = x.x.x.x

        Acct-Unique-Session-Id = "684b91e88bf31a83"

        Timestamp = 1278535059

        Request-Authenticator = Verified

 

 

Thanks, Gabriel



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5354 (20100810) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100810/d897d3ee/attachment.html>


More information about the Freeradius-Users mailing list