(RADIATOR) mysql + Timestamp problems

David Sexton dsexton at polyfone.com.au
Sun Jan 15 22:14:51 CST 2006


Hi There,

 

Have problem with radiator importing the wrong date into the Mysql database.
I also import a log time which is fine but not as a timestamp.

Any ideas would be great.

 

mysql> SELECT FROM_UNIXTIME(TIME_STAMP) FROM ACCOUNTING;

 

 

| 1955-07-27 19:57:42       |

| 1955-07-25 16:05:38       |

| 1955-07-25 18:04:31       |

| 1955-07-25 18:31:01       |

| 1955-07-02 17:21:04       |

| 1955-07-02 19:33:03       |

| 1955-07-02 19:59:02       |

| 1955-07-25 23:41:09       |

| 1955-07-26 00:22:33       |

| 1955-07-26 07:17:11       |

| 1955-07-26 12:45:35       |

| 1955-07-26 13:17:32       |

| 1955-07-26 13:59:04       |

 

[xxx at xxx]# date

Mon Jan 16 16:08:16 FJT 2006

 

# radius.cfg

#

# Example Radiator configuration file.

# This very simple file will allow you to get started with 

# a simple system. You can then add and change features.

# We suggest you start simple, prove to yourself that it

# works and then develop a more complicated configuration as required.

#

# This example will authenticate from a standard users file in

# DbDir/users and log accounting to LogDir/detail.

#

# It will accept requests from any client and try to handle request

# for any realm.

#

# You should consider this file to be a starting point only

# $Id: linux-radius.cfg,v 1.3 2002/03/24 23:07:49 mikem Exp $

 

#Foreground

#LogStdout

LogDir          /var/log/radius

LogFile         %L/logfile.%y-%m-%d

 

 

AuthPort        1645

AcctPort        1646

 

Trace           5

DbDir           /etc/radiator

DictionaryFile  %D/dictionary , %D/dictionary.cisco

 

 

 

 

# You will probably want to add other Clients to suit your site,

# one for each NAS you want to work with

<Client DEFAULT>

        Secret xxxxxxxxxx

        DupInterval 0

</Client>

 

<Client 202.137.178.1>

         Secret xxxxxxxxxx

         NasType cisco

         DupInterval 1

</Client>

 

<SessionDatabase SQL>

                DBSource        dbi:mysql:radius

                DBUsername      mysql_access

                DBAuth          xxxx

                AddQuery        insert into RADONLINE (USERNAME,\

                                NASIDENTIFIER, \

                                NASPORT, \

                                ACCTSESSIONID,\

                                TIME_STAMP,\

                                FRAMEDIPADDRESS, \

                                NASPORTTYPE, \

                                SERVICETYPE, \

                                DNIS) \

                values ('%n', '%N',\

                        %{NAS-Port},\

                         '%{Acct-Session-Id}',\

                          %{Timestamp},\

                         '%{Framed-IP-Address}',\

                         '%{NAS-Port-Type}', \

                         '%{Service-Type}', \

                         '%{Called-Station-Id}')

</SessionDatabase>

 

<Realm DEFAULT>

 <AuthBy SQL>

         DBSource        dbi:mysql:radius

         DBUsername      mysql_access

         DBAuth         xxxxx

 

        AuthSelect      select passwd, ipaddress, idlelimit, \

                        netmask, sessionlimit, portlimit, ratelimitup, \

                        ratelimitdown from USERS where username = '%n' and
status = 'OPEN' 

 

                 AuthColumnDef   0,User-Password,check

                 AuthColumnDef   1,Framed-IP-Address,reply

                 AuthColumnDef   2,Idle-Timeout,reply

                 AuthColumnDef   3,Framed-IP-Netmask,reply

                 AuthColumnDef   4,Session-Timeout,reply

                 AuthColumnDef   5,Port-Limit,reply

                 AuthColumnDef   6,Rate-Limit-Up,request

                 AuthColumnDef   7,Rate-Limit-Down,request

 

 

        AddToReply     cisco-avpair = ip:dns-servers=xxxxxxxxx xxxxxxx,\

                       cisco-avpair = lcp:interface-config=rate-limit output
%{Rate-Limit-Up} %{Rate-Limit-Up} %{Rate-Limit-Up} conform-action transmit
exceed-action transmit,\

                       cisco-avpair = lcp:interface-config=rate-limit input
%{Rate-Limit-Down} %{Rate-Limit-Down} %{Rate-Limit-Down} conform-action
transmit exceed-action transmit

 

 

AccountingStopsOnly 

AccountingTable ACCOUNTING 

               AcctColumnDef   USERNAME,User-Name 

               AcctColumnDef   TIME_STAMP,Timestamp,integer-date

               AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type 

               AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer 

               AcctColumnDef   ACCTINPUTOCTETS,Acct-Input-Octets,integer 

               AcctColumnDef   ACCTOUTPUTOCTETS,Acct-Output-Octets,integer 

               AcctColumnDef   ACCTSESSIONID,Acct-Session-Id 

               AcctColumnDef   ACCTSESSIONTIME,Acct-Session-Time 

               AcctColumnDef
ACCTTERMINATECAUSE,Ascend-Disconnect-Cause,integer 

               AcctColumnDef   NASIDENTIFIER,NAS-IP-Address 

               AcctColumnDef   NASPORT,NAS-Port,integer 

               AcctColumnDef   FRAMEDADDRESS,Framed-IP-Address 

               AcctColumnDef   CALLERID,Calling-Station-Id 

               AcctColumnDef   DATARATE,Ascend-Data-Rate,integer 

               AcctColumnDef   XMITRATE,Ascend-Xmit-Rate,integer 

               AcctColumnDef   CLIENTDNIS,Called-Station-Id 

               AcctColumnDef   LOGDATE,Timestamp 

</AuthBy>

       AcctLogFileName %L/detail

       PasswordLogFileName %L/password-%y-%m-%d.log

 

</Realm>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20060116/0623d13a/attachment.html>


More information about the radiator mailing list