Reporting on active users using radwho

Alan DeKok aland at deployingradius.com
Thu May 12 11:15:23 UTC 2022


On May 12, 2022, at 7:00 AM, Djerk Geurts via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> Over the last week, I’ve spent some time getting radsniff telemetry into Grafana via Collectd and Telegraf. Sadly radsniff direct to Telegraf doesn’t work, but that’s another story.

  There's also the stats produced by the server.  See "radmin stats" for more information.  The data is also available via Status-Server packets.  See raddb/sites-available/status.

> Wanting to graph online users I then scripted a rough little bit of bash to take the output of `radwho -r -n` and output the number of active users in influx format to Telegraf. However I’ve noticed that at midnight the reported online users drop to 0 to then slowly ramp up again. This may well be normal behaviour for what I should expect from rad who output, but it’s not what I’d like to see in my graph, it’s worrying to see the number of active xDSL subscribers drop to 0. I’d rather avoid having to state such a caveat.
> 
> Is there a better way to track active users using the data available from FreeRADIUS server, its tools or directly from the (MySQL) database?

  Put accounting data into SQL.  Then, count the number of rows which don't have a "stop time".

  Alan DeKok.



More information about the Freeradius-Users mailing list