(RADIATOR) Accounting / Session to Log SYSLOG ?

Faisal Imtiaz Faisal at Snappydsl.net
Thu Oct 12 17:46:53 CDT 2006


Thanks to Martin, and thank you.
It is now working, well.
I am going to have to give 'tweaking' Martin's hook a try.
 (need to get Start accounting records in the log too) 

Thanks -:)

Faisal Imtiaz
Computer Office Solutions Inc. /SnappyDSL.net
Ph: (305) 663-5518 
-----Original Message-----
From: Hugh Irvine [mailto:hugh at open.com.au] 
Sent: Thursday, October 12, 2006 6:41 PM
To: Faisal Imtiaz
Cc: radiator at open.com.au
Subject: Re: (RADIATOR) Accounting / Session to Log SYSLOG ?


Hello Faisal -

As Martin Wallner suggests (thanks Martin) you will need to use a hook for
this.

regards

Hugh


On 12 Oct 2006, at 21:22, Faisal Imtiaz wrote:

>
> Hello,
>
> While we are on the subject of logging messages to Syslog.
>
> Is there a way to send the accounting messages to Syslog ?
>   i.e.
> 	>         # Log accounting to a detail file
> 	>         AcctLogFileName        /usr/local/etc/radiator/detail
> Instead of going into a file, send these to a central Syslog server.
>
> Or
>    Is there a way to send the session messages to Syslog ?
>
> Our customer support reps use the Syslog heavily to provide customer 
> support and troubleshoot DSL connections.
> In the 'Log off' Accounting message there is a key bit of information 
> (reason for login off) that they could use by accessing it via Syslog.
> Logging at Trace 3 give too little info, and logging at Trace 4 give 
> too much info !
>
> Thanks.
>
> Faisal Imtiaz
> Computer Office Solutions Inc. /SnappyDSL.net
> Ph: (305) 663-5518
>
>
>> I am having a problem in getting Radiator to log to SYSLOG, I am 
>> running FreeBSD .
>>
>> Using Radiator Ver 3.12 on FreeBSD.
>> Using Syslog-ng -> fully operational.
>
>>
>> My Radius.cfg
>> -----------------------------------
>> #Foreground
>> LogStdout
>> LogDir          /usr/local/etc/radiator
>> DbDir           /usr/local/etc/radiator
>>
>> AuthPort 1645,1812
>> AcctPort 1646,1813
>>
>> # Priority level of trace messages to be logged in the log file (0
>> - 5)
>> Trace  3
>>
>> <Realm negia.net>
>>         <AuthBy RADIUS>
>>                 Host 69.55.xx.xx
>>                 Secret xxxxx
>>         	AuthPort 1812
>> 		AcctPort 1813
>> 	</AuthBy>
>>
>>          <ClientListSQL>
>>                 DBSource        dbi:mysql:radius:localhost
>>                 DBUsername      xxxxx
>>                 DBAuth          xxxxxxxx
>>                 RefreshPeriod   30
>>         </ClientListSQL>
>>
>> 	<AuthLog SQL>
>>                 # MySQL DB, DB radius, host localhost
>>                 DBSource dbi:mysql:radius:localhost
>>                 DBUsername xxxxxx
>>                 DBAuth xxxxxxxxxxx
>> 	        Table RADAUTHLOG
>>                 SuccessQuery insert into RADAUTHLOG (TIME_STAMP, 
>> USERNAME, TYPE, REASON, PASSWORD) values ('%l','%n', %0,
>> 'Succeeded','%P')
>>                 FailureQuery insert into RADAUTHLOG (TIME_STAMP, 
>> USERNAME, TYPE, REASON, PASSWORD) values ('%l','%n', %0,
>> 'Failed','%P')
>>                 LogSuccess 1
>>     	        LogFailure 1
>>
>> 	</AuthLog>
>>
>> </Realm>
>>
>>
>>
>> <Realm DEFAULT>
>>         <AuthBy SQL>
>>                 # MySQL DB, DB radius, host localhost
>>                 DBSource dbi:mysql:radius:localhost
>>                 DBUsername xxxxxxx
>>                 DBAuth xxxxxxx
>>
>>                 # Define Table and Columns for Authentication
>>                 AuthSelect select PASSWORD, SERVICETYPE, 
>> FRAMEDPROTOCOL, TRAFFICSHAPE, ACL, PORTLIMIT, TIMELEFT, IPPOOL, 
>> FRAMEDIPADD, FRAMEDIPNETMASK, FRAMEDROUTE, FRAMEDROUTING, DNS \
>>                         from SUBSCRIBERS where USERNAME = %0
>>                 AuthColumnDef 0, Password, check
>>                 AuthColumnDef 1, GENERIC, check
>>                 AuthColumnDef 2, GENERIC, reply
>>                 AuthColumnDef 3, GENERIC, reply
>>                 AuthColumnDef 4, GENERIC, reply
>>                 AuthColumnDef 5, GENERIC, reply
>>                 AuthColumnDef 6, GENERIC, reply
>>                 AuthColumnDef 7, GENERIC, reply
>>                 AuthColumnDef 8, GENERIC, reply
>>                 AuthColumnDef 9, GENERIC, reply
>>                 AuthColumnDef 10, GENERIC, reply
>>                 AuthColumnDef 11, GENERIC, reply
>>                 AuthColumnDef 12, GENERIC, reply
>>
>>                 # Define Table and Columns for Accounting
>>                 AccountingTable ACCOUNTING
>>                 AcctColumnDef   USERNAME,User-Name
>>                 AcctColumnDef   TIME_STAMP,Timestamp,formatted-date,\
>>                                 '%Y/%m/%e %H:%M:%S'
>>                 AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
>>                 AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer
>>                 AcctColumnDef   ACCTINPUTOCTETS,Acct-Input-
>> Octets,integer
>>                 AcctColumnDef   ACCTOUTPUTOCTETS,Acct-Output-
>> Octets,integer
>>                 AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
>>                 AcctColumnDef   ACCTSESSIONTIME,Acct-Session-
>> Time,integer
>>                 AcctColumnDef   ACCTTERMINATECAUSE,Acct-Terminate-
>> Cause
>>                 AcctColumnDef   NASIDENTIFIER,NAS-Identifier
>>                 AcctColumnDef   NASIPADDRESS,NAS-IP-Address
>>                 AcctColumnDef   NASPORT,NAS-Port,integer
>>                 AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
>>         </AuthBy>
>>         <ClientListSQL>
>>                 DBSource        dbi:mysql:radius:localhost
>>                 DBUsername      xxxxxx
>>                 DBAuth          xxxxxxxx
>>                 RefreshPeriod   30
>>         </ClientListSQL>
>>
>>        <SessionDatabase SQL>
>>                 DBSource        dbi:mysql:radius:localhost
>>                 DBUsername      xxxxxx
>>                 DBAuth          xxxxxxxx
>> 		AddQuery	insert into RADONLINE (USERNAME,
>> NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS, 
>> NASPORTTYPE, SERVICETYPE) values ('%u', '%{NAS-Identifier}', '%2', % 
>> 3, '%A', '%{Framed-IP-Address}', '%{NAS-Port-Type}',
>> '%{Service-Type}')
>> 		DeleteQuery	delete from RADONLINE where USERNAME=%0
>>        </SessionDatabase SQL>
>>
>>         # Log accounting to a detail file
>>         AcctLogFileName        /usr/local/etc/radiator/detail
>>
>> 	<AuthLog SQL>
>>                 # MySQL DB, DB radius, host localhost
>>                 DBSource dbi:mysql:radius:localhost
>>                 DBUsername xxxxx
>>                 DBAuth xxxxxxxxx
>> 	        Table RADAUTHLOG
>> 		SuccessQuery insert into RADAUTHLOG (TIME_STAMP, USERNAME,
> TYPE,
>> REASON, PASSWORD) values ('%l','%n', %0, 'Succeeded','%P')
>>                 FailureQuery insert into RADAUTHLOG (TIME_STAMP, 
>> USERNAME, TYPE, REASON, PASSWORD) values ('%l','%n', %0,
>> 'Failed','%P')
>>                 LogSuccess 1
>>                 LogFailure 1	
>> 	</AuthLog>
>> 	<Log SYSLOG>
>> 		Facility local5
>> 		Trace 4
>> 		LogSuccess 1
>> 		LogFailure 1		
>> 		SuccessFormat	%l,%n,%0,Success
>> 		FailureFormat	%l,%n,%0,Failure,%P	
>> 	</Log>
>> 	
>>  </Realm>
>>
>> ---------------------------------------------------
>>
>>
>> Faisal Imtiaz
>> Computer Office Solutions Inc. /SnappyDSL.net
>> Ph: (305) 663-5518
>>
>> --
>> Archive at http://www.open.com.au/archives/radiator/
>> Announcements on radiator-announce at open.com.au To unsubscribe, email 
>> 'majordomo at open.com.au' with 'unsubscribe radiator' in the body of 
>> the message.
>
>
>
> 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.
>
>
>
>
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au To unsubscribe, email 
> 'majordomo at open.com.au' with 'unsubscribe radiator' in the body of the 
> message.



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.




--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list