(RADIATOR) Question about Authlog SQL

Darwin Hormillosa dhormillosa at owtel.com
Mon Jan 10 01:33:42 CST 2005


Hi,


Here is part of our radius.config:

<AuthLog SQL>

DBSource dbi:ODBC:isp

DBUsername username

DBAuth password

Table CallDetails

LogSuccess 1

SuccessQuery InsertCallDetails '%B','%n','%a',1,'%P',%1,'%C','%{Calling-Station-Id}','%{Called-Station-Id}','%h'

LogFailure 1

FailureQuery InsertCallDetails '%B','%n','%a',0,'%P',%1,'%C','%{Calling-Station-Id}','%{Called-Station-Id}', '%h'


</AuthLog>

<AuthBy SQL>

# Adjust DBSource, DBUsername, DBAuth to suit your DB

DBSource dbi:ODBC:databasename

DBUsername sa

DBAuth fireproof 


# Only one session per user at a time

DefaultSimultaneousUse 1

# Let the user in if they have any time left, set

# the Session-timeout to the time left


AuthSelect CheckISPUser %0 

AuthColumnDef 0,User-Password,check

AuthColumnDef 1,ValidTo,check

AuthColumnDef 2,Reply-Message,reply



#session-timeout

AddToReply Service-Type=Framed-User, Framed-Protocol=PPP, \

Framed-MTU=1500, Session-Timeout="until ValidTo", Idle-Timeout=3600

# Adjust the time left when they log out

# AcctSQLStatement update SUBSCRIBERS set TIMELEFT=TIMELEFT-0%{Acct-Session-Time} where USERNAME='%n'

HandleAcctStatusTypes Start,Stop

AcctSQLStatement UpdateValidityDate '%n'

AcctSQLStatement InsertBilling '%{User-Name}','%B','%{NAS-Port}','TIME-USED','%{Framed-IP-Address}','%{Framed-IP-Address}',0%{Acct-Session-Time},'%N','%C','%{Calling-Station-Id}','%{Called-Station-Id}','%{Acct-Input-Octets}','%{Acct-Output-Octets}','%{Acct-Terminate-Cause}','%{Acct-Session-Id}','%{Acct-Status-Type}','%{Access-Accept}'



# AcctSQLStatement InsertBilling '%{User-Name}','%B',0%{Acct-Session-Time},0%{Acct-Session-Time},'%c',"time used",'%N','%N','%{Acct-Terminate-Cause}','%{Acct-Session-Id}','%{Acct-Input-Octets}','%{Acct-Output-Octets}','%{Calling-Station-Id}'

</AuthBy>



Here are my questions:

1. My question is, we were able to log the ip address,acct-input-octet,acct-output -octet using Authby SQL but we can't get those particulars using Authlog SQL. We tried the same parameters used in Authby SQL such as '%{Framed-IP-Address}','%{Acct-Input-Octets}','%{Acct-Output-Octets}', but it won't work in Authlog SQL. Do you think it is normal since Authby XXX defines how to authenticate and record accounting information while Authlog SQL defines how to log authentication failures and successes. Or the Authlog SQL really does not support these parameters?



2. We have a line on our radius.config e.g AuthColumnDef 2, Reply-Message,reply. How can we pass the value of the Reply-Message generated in Radiator logs to the AcctSQLStatement?

3. We also want to log what config file our radiator radius server is using to be log on our SQL database, is it possible, how can we do that, is there any parameters which we can use to log this particular item.

Thanks in advance.
Darwin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20050110/f1c098d3/attachment.html>


More information about the radiator mailing list