rlm_sqlcounter always return 0 Resolved !!!!!

Mike Russell sircoolhot at gmail.com
Tue Jan 8 08:49:04 CET 2013


On Tue, Jan 8, 2013 at 12:05 AM, Alan DeKok <aland at deployingradius.com>
 wrote:

>
> Alan DeKok Wrote:
>


> The sqlcounter module should be pretty simple.  Configure accounting data
> to go into SQL, and ensure that the server is receiving accounting packets.
>  Then, configure the sqlcounter module.
>


> My rlm_sqlnoresetcounter module:
>
> sqlcounter noresetcounter {
>                 counter-name = Max-All-Session-Time
>                 check-name = Max-All-Session
>                 sqlmod-inst = sql
>
                    key = User-Name

>                  reset = never
>                  query = "SELECT IFNULL(SUM(AcctSessionTime),0)
> FROM radacct WHERE UserName='${key}'"
>
>


Alan DeKok Wrote:

You edited the default configuration, and broke it.  Don't do that. The
default uses %{${key}}, not ${key}.  They're different.

Russell Wrote:
Yes, Alan D.
That's Brilliant, You hit the nail in the head strate, your advice fixed
the problem. Configuration is now working!!!

Counter is retuning the values back and prepaid users are in control now.
I was struggling about a week now. Billion of thanks man. World
is grateful for the work you are doing.

Secondly, You are right, i broke the server by changing the veritable in
query. I was advised to change make changes and i did it wrong **my
mistake**. Kindly advice me for this warnings as well. Can i safely ignore
them? They caused me to change the default query

When i start the server is debug mode and users authenticate. i get this
two lines. Are they safe to ignore?

WARNING: Please replace '%k' with '${key}'
WARNING: Please replace '%S' with '${sqlmod-inst}'

Thanks Alan you saved my life.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130108/8a3e641f/attachment.html>


More information about the Freeradius-Users mailing list