Problem with the sqlcounter!
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Thu Oct 2 13:34:28 CEST 2014
On 2 Oct 2014, at 12:08, 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'
Hm I guess that should be Couldn't find check attribute 'control:Max-Hours-Passed' but still
the message is pretty clear...
You've not set the check item in the sql db 'Max-Hours-passed'.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20141002/23a47a71/attachment.pgp>
More information about the Freeradius-Users
mailing list