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:
-
edit the file radmysql.h. There you have to define several constants
to access your Mysql-Database
-
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
-
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.
-
type in make to compile everything
-
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