[RADIATOR] Missing attributes

Michael ringo at vianet.ca
Wed Dec 7 05:53:18 CST 2011


Isn't AuthSelect used for authentication queries in <AuthBy SQL>?  not accounting inserts?  Aren't you suppose to be using a combination of AccountingTable and AcctColumnDef or use AcctSQLStatement?

I use both ways, for different purposes. be aware i use some of my own custom attributes, ie %{uid} and %{zone}, but you get the idea.
eg1:
         AccountingTable `acct_%f%g`
         AcctColumnDef   `submitted_un`,%u,formatted
         AcctColumnDef   `timestamp`,%b,formatted
         AcctColumnDef   `sess_id`,Acct-Session-Id
         AcctColumnDef   `sess_time`,Acct-Session-Time
         AcctColumnDef   `term_cause`,Acct-Terminate-Cause
         AcctColumnDef   `nas_ip_address`,NAS-IP-Address
         AcctColumnDef   `nas_id`,NAS-Identifier
         AcctColumnDef   `ip_address`,Framed-IP-Address
	<SNIP>

eg2:
         AcctSQLStatement INSERT INTO whoison (timestamp, submitted_un, auth_un, uid, zone, ip_address, sess_id, \
                 extended_sess_id, sess_svr_key, service, nas_ip_address, \
                 upload, up_octets, up_giga, download, down_octets, \
                 down_giga, last_updated, sess_time, nas_id, nas_port, device, card, port, vlan) \
                 VALUES (%b-%{Acct-Session-Time}, '%u','%{auth-un}','%{uid}','%{zone}','%{Framed-IP-Address}','%{Acct-Session-Id}', \
                 '%{extended-sess-id}', '%{Ascend-Session-Svr-Key}','%{service}','%{NAS-IP-Address}', \
                 '%{total-input-octets}', '%{Acct-Input-Octets}', '%{Acct-Input-Gigawords}', '%{total-output-octets}', '%{Acct-Output-Octets}', \
                 <SNIP>

Michael




On 11-12-07 06:47 AM, Heinrich Mislik wrote:
> On 7 Dec 2011 at 9:15, Hugh Irvine wrote:
>
>>>>> Hi, most of our NAS devices include Acct-Output-Gigawords in
>> their accounting requests, so we store it in our SQL database using
>> an AuthSelect parameter with the
>> %{IntegerValue:Acct-Output-Gigawords} syntax. But, we have a few
>> devices that do not include it. So every time the AuthSelect is run
>> in that case, we get this error in the log:
>>>>>
>>>>> ERR: There is no value named  for attribute
>> Acct-Input-Gigawords. Using 0.
>>>>>
>>>>> I would request that either this be reduced in severity from
>> error, or provide the opportunity to specify a default setting (e.g.
>> %{IntegerValue:Acct-Input-Gigawords|0} where 0 is the default in
>> case it's not present.) We did the former in our installation
>> because it was easy, but the latter would probably be more useful.
>>>>>
>>>>> Or, if there's already a way to deal with this I'd love to hear
>> it. Thanks.
>
> I would try:
>
>     AddToRequestIfNotExist Acct-Input-Gigawords=0
>
> Cheers
>
> Heinrich


More information about the radiator mailing list