Hello Ragnar -
On Thu, 02 Sep 1999, Ragnar Kurm wrote:
> i'm trying to make radiator to log everything into my database.
> my database table would contain following fields: id, key, value.
> one log event would be grouped by id. how can this be achieved?
>
> nearest solution i can think of is following:
> * hack radiator to provide a perl code to access all event attributes
> * encode them into a long string
> * call database procedure and pass the string
> * the procedure would decode the string and insert key-value pairs
> with shared id into table
>
> is there more elegant way to do this? especially should i hack radiator or
> does it provide facilities to satisfy my needs without hacking one?
Yes there is:
<Log SQL>
DBSource ...
DBUsername ...
DBAuth ...
...
</Log>
or
# Use an SQL table specified by AccountingTable
# Columns are defined by AcctColumnDef
<AuthBy SQL>
DBSource ...
DBUsername ...
DBAuth ...
AccountingTable ...
AcctColumnDef ...
...
</AuthBy>
or
# Use an SQL table specified by AccountingTable
# Define an SQL statement to perform inserts with AcctSQLStatement
<AuthBy SQL>
DBSource ...
DBUsername ...
DBAuth ...
AccountingTable ...
AcctSQLStatement ....
...
</AuthBy>
There are a number of excellent examples in the distributed goodies directory.
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.