Hi everybody,
The sqlcounter module does not work properly when i put the sqlmod-inst
in a remote sql, and the authorize sql at the localhost. Indeed, when i
have this config, the radius_xlat from rlm_sqlcounter is always
returning a null, and i do not see any trace of sql queries in the
remote mysql ...
However, all the other combinaisons work : sqlmod-inst -> local &&
authorize sql -> remote, or all in the remote sql.
Have someone already known this problem ? or have someone an explanation
?
-- a trace of the log on debug (rlm_sqlcounter) --
sqlcounter_expand: 'SELECT SUM(AcctSessionTime - GREATEST((1020200400 -
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE
UserName='%{User-Name}' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '1020200400''
radius_xlat: 'SELECT SUM(AcctSessionTime - GREATEST((1020200400 -
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='test'
AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '1020200400''
sqlcounter_expand: '%{sql_remote:SELECT SUM(AcctSessionTime -
GREATEST((1020200400 - UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct
WHERE UserName='test' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '1020200400'}'
radius_xlat: ''
rlm_sqlcounter: (Check item - counter) is greater than zero
rlm_sqlcounter: Authorized user do-risika, check_item=7200, counter=0
rlm_sqlcounter: Sent Reply-Item for user do-risika,
Type=Session-Timeout, value=7200
-- part of my radiusdconf --
...
sqlcounter sqlcounter_monthly {
counter-name = SQL-Monthly-Session-Time
check-name = SQL-Max-Monthly-Session-Time
sqlmod-inst = sql_remote
key = User-Name
query = "SELECT SUM(AcctSessionTime - GREATEST((%b -
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}'
AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
reset = monthly
}
}
authorize {
sql
files
sqlcounter_monthly
}
Thanx,
@+
--
DouRiX
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html