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