On 2/24/07, Graham Beneke <graham_bulk@apolix.co.za> wrote:
In the current version of FR (1.1.4) the sqlcounter module is no longer experimental - comes as in the default collection of modules.
There is also a wiki article on using sqlcounter: http://wiki.freeradius.org/Rlm_sqlcounter
Its not complete but I am working on it.
-- Graham Beneke
Interesting, tnx for your work! I'm struggling with the sqlcounter module too for the moment. Try to define the reply-name (FR1.1.4), but it gives me errors If I specify this in sqlcounter.conf: sqlcounter volumelimit { counter-name = Octets-Total check-name = Max-Octets reply-name = ChilliSpot-Max-Total-Octets sqlmod-inst = sql key = User-Name reset = monthly # This query will calculate the total volume used it results in: freeradius -X | grep sqlcounter <snip> sqlcounter: counter-name = "Octets-Total" sqlcounter: check-name = "Max-Octets" sqlcounter: reply-name = "ChilliSpot-Max-Total-Octets" sqlcounter: key = "User-Name" sqlcounter: sqlmod-inst = "sql" sqlcounter: query = "SELECT (SUM(AcctInputOctets) +SUM(AcctInputGigawords * 4294967295) +SUM(AcctOutputOctets) +SUM(AcctOutputGigawords * 4294967295)) / 1048576 FROM radacct WHERE UserName = '%{%k}' AND AcctStartTime > FROM_UNIXTIME('%b')" sqlcounter: reset = "monthly" sqlcounter: safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /" rlm_sqlcounter: No such attribute ChilliSpot-Max-Total-Octets obelix:/etc/freeradius# sqlcounter: counter-name = "Octets-Total" sqlcounter: check-name = "Max-Octets" sqlcounter: reply-name = "ChilliSpot-Max-Total-Octets" sqlcounter: key = "User-Name" sqlcounter: sqlmod-inst = "sql" sqlcounter: query = "SELECT (SUM(AcctInputOctets) +SUM(AcctInputGigawords * 4294967295) +SUM(AcctOutputOctets) +SUM(AcctOutputGigawords * 4294967295)) / 1048576 FROM radacct WHERE UserName = '%{%k}' AND AcctStartTime > FROM_UNIXTIME('%b')" sqlcounter: reset = "monthly" sqlcounter: safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /" rlm_sqlcounter: No such attribute ChilliSpot-Max-Total-Octets obelix:/etc/freeradius# Strange... But I'm not in a rush, I'll find out what's wrong :-) Kind regards, Yves