(RADIATOR) modifying accounting SQL statements

Hugh Irvine hugh at open.com.au
Mon Jun 9 19:27:49 CDT 2003

Hello Tunde -

You should use the following syntax:


which will insert 0 if the attribute is not present.



On Tuesday, Jun 10, 2003, at 03:07 Australia/Melbourne, Ayotunde 
Itayemi wrote:

> Hi Hugh, Hi All,
> I have some SQL accouting statement that inserts the connect-speeds 
> along with some other
> connection parameters into an SQL table. At first it worked fine then 
> I suddenly noticed
> that no new records were being put into the table. The trace 4 debug 
> log showed that the
> accounting records coming from the RAS (Patton boxes) sometimes did 
> not contain the
> affected fields (Ascend-Data-Rate and Ascend-Xmit-Rate) - not that 
> they are set to zero -
> they are not in the records written to the radius log at all). This 
> causes the SQL insert
> statement to fail. Is there someway I can get the insert to succeed 
> even when some fields
> are missing?  
> I was thinking of something like:  INSERT .... %{Ascend-Xmit-Rate}+0, 
> .....
> Now I find that ALL the packets from the patton RASes (model 2966) 
> dont contain the
> 2 fields at all - and I haven't reconfigured the boxes at all.
> "Radiator looks radiant!"
> Regards,
> Tunde Itayemi.
> The accouting-start insert statement as it stands currently (the other 
> one is for accounting-stop)
> AcctSQLStatement insert into accessaccounting values ( \
>  '%{User-Name}', 0,'%{Acct-Status-Type}', \
>  '%{NAS-Identifier}', \
>  '%{Called-Station-Id}', '%{Calling-Station-Id}', \
>  %{Ascend-Data-Rate}, %{Ascend-Xmit-Rate}, \
>  '%{Framed-IP-Address}', %{Acct-Delay-Time}, \
>  '%o', to_date('%o', 'DY MON DD HH24:MI:SS YYYY'), \
>  '%o', to_date('%o', 'DY MON DD HH24:MI:SS YYYY') )

NB: 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 95/98/2000, NT, MacOS X.
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3214 bytes
Desc: not available
URL: <http://www.open.com.au/pipermail/radiator/attachments/20030610/f24d7102/attachment.bin>

More information about the radiator mailing list