[RADIATOR] Account log to MySQL

Chad Roseburg croseburg at ncrl.org
Tue Feb 3 15:39:03 CST 2015


Goal:
Capture successful logins as well as failures for stats purposes.

I am setting up logging to a local MySQL instance. Here's what I've done:

* Following instructions in the 'mysqlcreate.sql' file, I created the
radius table and user(s).
* Created the Mysql tables using the provided 'mysqlCreate.sql' in goodies.
* Added the following stanza to my Handler just below the SIP Authby stanza:

---------- conf -------------
<Handler>
<Handler>
       <AuthBy SIP2>
                Port   6001
                Host  siphost.com

                Delimiter |

                LoginUserID sipuser
                LoginPassword supersecret
                LocationCode Radiator

                 SendChecksum no
                 VerifyChecksum no

                NoDefault
                EAPType GTC
        </AuthBy>
        <AuthLog SQL>
                DBSource        dbi:mysql:radius:localhost
                DBUsername      radius
                DBAuth          secrets
                LogSuccess
                SuccessQuery    insert into RADAUTHLOG (TIME_STAMP,
USERNAME, TYPE, REASON) values (%t, '%n', 1)
                LogFailure
                FailureQuery    insert into RADAUTHLOG (TIME_STAMP,
USERNAME, TYPE, REASON) values (%t, '%n', 0, %1)
        </AuthLog>
</Handler>
------------------------------ /conf -------------------------------

I'm not seeing anything with:
SELECT * FROM RADAUTHLOG;

Is it just a quiet day or am I missing something?

Last question is: does USERNAME refer to the client?

Thank you!

-- 
Chad Roseburg
Automation Dept.
North Central Regional Library
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20150203/8978b50e/attachment.html 


More information about the radiator mailing list