Reporting from logs

Leal, Paulo P.Leal at city.ac.uk
Wed Sep 26 12:01:52 CEST 2012


Many thanks for the responses, think SQL is the way forward and then query the database.

Cheers
Paulo


-----Original Message-----
From: Matthew Newton [mailto:mcn4 at leicester.ac.uk] 
Sent: 25 September 2012 14:39
To: FreeRadius users mailing list
Subject: Re: Reporting from logs

Hi,

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
stop.

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.

Cheers,

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>

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 le.ac.uk>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list