(RADIATOR) SessionDatabase question

Hugh Irvine hugh at open.com.au
Wed Aug 25 04:11:47 CDT 2004


Hello Fred -

The Timestamp in the SessionDatabase is an integer.

regards

Hugh


On 25 Aug 2004, at 18:34, Fred Leeflang wrote:

> Hi,
>
> I tried to make radiator log it's session database in MySQL using:
>
> <SessionDatabase SQL>
>   Identifier SessionSQL
>   DBSource DBI:mysql:database=usertracking
>   DBUsername uertracking
>   DBAuth xxxxx
> </SessionDatabase>
>
> <Handler Request-Type = Accounting-Request, NAS-IP-Address=a.b.c.d>
>       AuthBy SQLAccounting
>       SessionDatabase SessionSQL
> </Handler>
>
> This seems to work, with one irritating side effect.
>
> mysql> desc RADONLINE;
> +-----------------+-------------+------+-----+---------+-------+
> | Field           | Type        | Null | Key | Default | Extra |
> +-----------------+-------------+------+-----+---------+-------+
> | USERNAME        | varchar(50) | YES  |     | NULL    |       |
> | NASIDENTIFIER   | varchar(50) | YES  |     | NULL    |       |
> | NASPORT         | int(11)     | YES  |     | NULL    |       |
> | ACCTSESSIONID   | varchar(30) | YES  |     | NULL    |       |
> | TIME_STAMP      | datetime    | YES  |     | NULL    |       |
> | FRAMEDIPADDRESS | varchar(22) | YES  |     | NULL    |       |
> | NASPORTTYPE     | varchar(10) | YES  |     | NULL    |       |
> | SERVICETYPE     | varchar(20) | YES  |     | NULL    |       |
> +-----------------+-------------+------+-----+---------+-------+
>
> I have modified the TIME_STAMP from the column type specified in  
> goodies/mysqlCreate.sql
> This is also the column that gives weird results (no surprise there is  
> Radiator believes it's
> an integer column, but when I had it an int column it did not work at  
> all, I got NULL's
> in the column)
>
> Either way, my goal is to make this timestamp column identical to what  
> I have in
> the RAD_ACCOUNTING table, which I specified like this:
>
> <AuthBy SQL>
>   DateFormat %Y-%m-%d %X
>   Identifier SQLAccounting
>   DBSource DBI:mysql:database=usertracking
>   DBUsername usertracking
>   DBAuth xxxxx
>   AuthSelect
>   AccountingTable RAD_ACCOUNTING
>   HandleAcctStatusTypes Start,Alive,Stop
>   AcctColumnDef USERNAME,User-Name
>   AcctColumnDef TIME_STAMP,Timestamp,integer-date
>   AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type
>   AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
>   AcctColumnDef ACCTINPUTOCT,Acct-Input-Octets,integer
>   AcctColumnDef ACCTOUTPUTOCT,Acct-Output-Octets,integer
>   AcctColumnDef ACCTSESSIONID,Acct-Session-Id
>   AcctColumnDef ACCTSESSTIME,Acct-Session-Time,integer
>   AcctColumnDef ACCTTERMINATECAUSE,Acct-Terminate-Cause
>   AcctColumnDef NASIDENTIFIER,NAS-Identifier
>   AcctColumnDef NASPORT,NAS-Port,integer
>   AcctColumnDef NASIPADDRESS,NAS-IP-Address
>   AcctColumnDef CALLEDSTATIONID,Called-Station-Id
>   AcctColumnDef CALLINGSTATIONID,Calling-Station-Id
> </Authby>
>
> With this table structure:
>
> mysql> desc RAD_ACCOUNTING;
> +--------------------+-----------+------+-----+--------------------- 
> +----------------+
> | Field              | Type      | Null | Key | Default             |  
> Extra          |
> +--------------------+-----------+------+-----+--------------------- 
> +----------------+
> | id                 | int(11)   |      | PRI | NULL                |  
> auto_increment |
> | USERNAME           | char(32)  | YES  |     | NULL                |   
>               |
> | TIME_STAMP         | datetime  |      |     | 0000-00-00 00:00:00 |   
>               |
> | ACCTSTATUSTYPE     | char(32)  | YES  |     | NULL                |   
>               |
> | ACCTDELAYTIME      | int(11)   | YES  |     | NULL                |   
>               |
> | ACCTINPUTOCT       | int(11)   | YES  |     | NULL                |   
>               |
> | ACCTOUTPUTOCT      | int(11)   | YES  |     | NULL                |   
>               |
> | ACCTSESSIONID      | char(32)  | YES  |     | NULL                |   
>               |
> | ACCTSESSTIME       | int(11)   | YES  |     | NULL                |   
>               |
> | ACCTTERMINATECAUSE | char(128) | YES  |     | NULL                |   
>               |
> | NASIDENTIFIER      | char(64)  | YES  |     | NULL                |   
>               |
> | NASPORT            | int(11)   | YES  |     | NULL                |   
>               |
> | NASIPADDRESS       | char(16)  | YES  |     | NULL                |   
>               |
> | CALLEDSTATIONID    | char(18)  | YES  |     | NULL                |   
>               |
> | CALLINGSTATIONID   | char(18)  | YES  |     | NULL                |   
>               |
> +--------------------+-----------+------+-----+--------------------- 
> +----------------+
>
> Is there anything I need to specify in the SessionDatabase section  
> that will make Radiator
> put the time stamp correctly in a datetime format in the RADONLINE  
> table?
>
> Thanks,
> Fred
>
>
> --
> 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 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.
-
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