(RADIATOR) modifying accounting SQL statements

Mike McCauley mikem at open.com.au
Mon Jun 9 19:23:39 CDT 2003


Hello,


On Tue, 10 Jun 2003 03:07 am, 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, .....

That would prob work.
A more common thing to do is:

INSERT .... 0%{Ascend-Xmit-Rate}, 

so that you either get the real number with a leading 0, or just 0.

Cheers.

>
> 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') )

-- 
Mike McCauley                               mikem at open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985                       Fax   +61 3 9598-0955

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, 
TTLS, PEAP etc on Unix, Windows, MacOS etc.

===
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