[RADIATOR] Logging to MSSQL-DB with SessionDatabase SQL

Hugh Irvine hugh at open.com.au
Sun Jan 31 15:39:52 CST 2010


Hello -

I will need to see the complete configuration file and a trace 4 debug including the startup messages showing what is happening.

What hardware/software platform are you running on? what version of Radiator? what version of Perl?

regards

Hugh


On 31 Jan 2010, at 21:18, Lay_C wrote:

> 
> Hello,
> 
> I have the task to log all connections to a database. It's only one table
> with the following columns:
> SessionID, Username, IPv4Address, IPv6Address, AcctTerminateCause,
> SessionStart, SessionStop, AcctInputPackets, AcctOutputPackets
> 
> I can connect to my dsn via isql, but I think it doesn't work from the
> radius.cfg
> 
> The important excerpt looks like this:
> 
> <SessionDatabase SQL>
>        Identifier SQLLog
>        DBSource   dbi:ODBC:RADIUS
>        DBUsername username
>        DBAuth     password
>        AddQuery   insert into Session (SessionID, Username, IPv4Address,
> IPv6Address, AcctTerminateCause, SessionStart, SessionStop,
> AcctInputPackets, AcctOutputPackets) values (%{Acct-Session-ID}, %u,
> %{Framed-IP-Address}, '0', 'running', now(), -1, '0', '0')
>        DeleteQuery UPDATE Session SET SessionStop = now(), AcctInputPackets
> = %{Acct-Input-Packets},AcctOutputPackets = %{Acct-Output-Packets} WHERE
> Username = %u AND SessionID = %{Acct-Session-ID}
> </SessionDatabase>
> 
> My Idea was that this way I can update the Rows when the Session is closed.
> But when testing the server with "radpwtst -trace -nostop -chap -user
> Username -password Password -framed_ip_address 123.123.123.123 -secret
> testtest" It doesn't write to the database.
> I set trace in the radius.cfg to 5 but I can't see any error.
> 
> -- 
> View this message in context: http://old.nabble.com/Logging-to-MSSQL-DB-with-SessionDatabase-SQL-tp27361270p27361270.html
> Sent from the Radiator - General mailing list archive at Nabble.com.
> 
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator



NB: 

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets), 
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.





More information about the radiator mailing list