Log Radius Accounting Info to a Mysql Database


Someday I had some free time and wanted to collect the accounting infos from our Ascend-Router in a SQL-database rather than in the detail-file. I found some scripts to analyze the detail file and transfer everything into a database, but the idea of having the daemon write it's info directly into my database was fascinating. So I played a little bit with the code of ascend's newest radius daemon...
You can find my results below...

I hope this is what you searched for, if not I'm afraid of having wasted your time ;-)

If you have something to add, change or even some bug-reports, please mail me at jonny@dillingen.baynet.de


[   Installation  -  Download  -  Copyright  ]

Installation:

  1. edit the file radmysql.h. There you have to define several constants to access your Mysql-Database
  2. create the necessary database & table on your mysql-Server. You can use the SQL commands in the file create.sql to create the table. To use it, type in: cat create.sql | mysql DATABASE
  3. edit the Makefile. The contributed Makefile works for me on Solaris 2.4 But it should not be difficult to adapt it to other systems, cause ascend's instructions in the Makefile are very good.
  4. type in make to compile everything
  5. start ./radiusd and test it :-)

Download

If you decided to give this hack a try, you can download the actual version here: 

radmysql.tgz

or if you have problems with .tgz files: radmysql.zip


Copyright

I distribute this program under the same license as ascend distributes the radius daemon itself.


 © 1998  js