Problem with the sqlcounter!

Russell Mike radius.sir at gmail.com
Thu Oct 2 13:44:07 CEST 2014


Can you send all debug output ?

Thanks
RM --

On Thu, Oct 2, 2014 at 11:08 AM, Haviaras Kostas <koshalirod at gmail.com>
wrote:

> Hello, I have configure my FreeRadius to work with MySQL, I also add the
> sqlcounter to count the hours user after the first login.
> Here is my code:
> mods-enabled/sqlcounter:
>
> sqlcounter checkthetime {
>     sql_module_instance = sql
>     dialect = ${modules.sql.dialect}
>
>         counter_name = All-Hours-Passed
>         check_name = Max-Hours-Passed
>         reply_name = Session-Timeout
>         key = User-Name
>         reset = never
>
>         $INCLUDE
> ${modconfdir}/sql/counter/${dialect}/${.:instance}.conf
> }
>
> checkthetime.conf:
>
> query = "\
>         SELECT HOUR(SEC_TO_TIME(UNIX_TIMESTAMP() -
> UNIX_TIMESTAMP(AcctStartTime))) \
>         FROM radacct \
>         WHERE UserName = '%{${key}}' LIMIT 1;"
>
> sites-available/default:
>
> authorize {
> ....
>
> sql
> checkthetime
> ....
> }
>
> I am getting this message from the debug mode:
>
> (0)  WARNING: checkthetime : Couldn't find control attribute
> 'control:Max-Hours-Passed'
>
> I don't know if I have make any syntax error! Thanks for your attention
> and time!
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20141002/6bb91bec/attachment.html>


More information about the Freeradius-Users mailing list