SQL Accouting
Paolo Rotela
paolo.rotela at bluetelecom.com
Wed Sep 28 21:42:42 CEST 2005
> That is exactly the setup I have, but it doesn't seem to be working.
> There are no errors reported in radius.log, and no accounting queries in
> sqltrace.sql. Any ideas?
Yep, reinstall it ;)
No, really, you should try to shutdown the daemon and try running
"radiusd -X", then test it, and see if the debugging mode tells you
something :)
>
> Cheers, Ben
>
> On Wed, 2005-09-28 at 15:08 -0300, Paolo Rotela wrote:
>> You should have something like this in your radiusd.conf
>>
>> $INCLUDE ${confdir}/sql.conf
>>
>> Then you should have this in sql.conf (or the file pointed to by the
>> include, my example is with mysql, could be another engine)
>>
>> sql {
>>
>> # Database type
>> # Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
>> # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc,
>> rlm_sql_freetds
>> driver = "rlm_sql_mysql"
>>
>> # Connect info
>> server = "localhost"
>> login = "user"
>> password = "user"
>>
>> # Database table configuration
>> radius_db = "radius"
>>
>> # If you want both stop and start records logged to the
>> # same SQL table, leave this as is. If you want them in
>> # different tables, put the start table in acct_table1
>> # and stop table in acct_table2
>> acct_table1 = "radacct"
>> acct_table2 = "radacct"
>>
>> ....
>>
>> and then some accounting_*_query that inserts or updates the
>> ${acct_table1}
>> or ${acct_table2}.
>>
>> Then your "accounting {" section in radiusd.conf should have a line
>> saying
>> "sql" or the sql instance name (if you are using more than the default
>> instance for sql module).
>>
>> And then you must have the "radius" database and the "radacct" table.
>>
>>
>> If all this is ok, then I don't know for sure, you should check your
>> radius.log for errors in the sql module.
>>
>> ----- Original Message -----
>> From: "Ben Dowling" <bendowling at lineone.net>
>> To: "FreeRadius users mailing list"
>> <freeradius-users at lists.freeradius.org>
>> Sent: Wednesday, September 28, 2005 2:30 PM
>> Subject: Re: SQL Accouting
>>
>>
>> >I previously mentioned, the accounting section contains just 'sql'. I
>> > have no sql section in radiusd.conf though (perhaps this is my
>> > problem?)
>> > and no sql_accouting definitions in my sql.conf, but the sql accouting
>> > queries are defined there, and they are correct.
>> >
>> > The sql connection is working, and post auth data gets logged fine,
>> > just
>> > not the accouting stuff.
>> >
>> > Cheers, Ben
>> >
>> > On Wed, 2005-09-28 at 09:11 -0300, Paolo Rotela wrote:
>> >> Yep, but I need some more info. Your sql section in radiusd.conf and
>> >> your
>> >> sql_accounting* definitions in sql.conf. Also the "accounting" section
>> >> in
>> >> radiusd.conf, in wich it must be a "sql" instance.
>> >>
>> >> Ing. Paolo Rotela
>> >> Jefe Técnico
>> >> Blue Telecom
>> >>
>> >> Eng. Paolo Rotela
>> >> CTO
>> >> Blue Telecom
>> >> ----- Original Message -----
>> >> From: "Ben Dowling" <bendowling at lineone.net>
>> >> To: "FreeRadius users mailing list"
>> >> <freeradius-users at lists.freeradius.org>
>> >> Sent: Tuesday, September 27, 2005 6:00 PM
>> >> Subject: SQL Accouting
>> >>
>> >>
>> >> > Hi,
>> >> >
>> >> > I'm still having problems getting FreeRadius-1.0.4 to log accounting
>> >> > data to sql. I know it is receiving the data, as I can log it to
>> >> > file.
>> >> > In my accounting section I have 'sql', and the SQL queries are there
>> >> > in
>> >> > sql.conf. However, when looking at the sqltrace log the only queries
>> >> > are
>> >> > inserts to radpostauth. Can anyone help?
>> >> >
>> >> > Thanks in advance, Ben
>> >> >
>> >> > -
>> >> > List info/subscribe/unsubscribe? See
>> >> > http://www.freeradius.org/list/users.html
>> >> >
>> >>
>> >> -
>> >> List info/subscribe/unsubscribe? See
>> >> http://www.freeradius.org/list/users.html
>> >
>> > -
>> > List info/subscribe/unsubscribe? See
>> > http://www.freeradius.org/list/users.html
>> >
>>
>> -
>> List info/subscribe/unsubscribe? See
>> http://www.freeradius.org/list/users.html
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
More information about the Freeradius-Users
mailing list