Reporting from logs

Matthew Newton mcn4 at
Tue Sep 25 15:39:19 CEST 2012


On Tue, Sep 25, 2012 at 02:00:10PM +0100, Leal, Paulo wrote:
> Just wondering what kind of reporting you have managed to get
> out from the FreeRadius logs, we wanted some user friendly
> reports with user numbers, success and failed attempts, what
> realms were used and numbers, even possibly bandwidth consumed
> per user. Daily, weekly and monthly reports.

We use hand-crafted linelog in carefully placed locations in the
config so that we end up with a single line in a log file for each
of auth accept, auth reject, acct start, acct update and acct

Each line is tab-separated and has fields in the same place so,
for example, User-Name is always in column 7.

We then have a nightly cron job that awk/greps stats out of this
daily log file, as well as a custom web interface that lets us
easily grep data out in real time.

The best way to go is probably SQL, but this works well and is
plenty fast enough for us without having the added complexities of
a database running as well. Having said that, all logs are now
rad-relayed to a central RADIUS server for the web site, so I
could safely get a non-resilient database running there for
querying. Just haven't had time or the need yet.



Matthew Newton, Ph.D. <mcn4 at>

Systems Architect (UNIX and Networks), Network Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at>

More information about the Freeradius-Users mailing list