rediswho module config
Ispas Paul
paul.ispas at akta.ro
Thu Feb 26 11:09:00 CET 2015
Hello Alan ,
Thanks for your reply.
Below in this email is the config used , which is the default config
from freeradius-server-3.0.7.tar.bz2 ( there is no "insert" on line 10,
there
is the begining of the module config - rediswho)
Steps to reproduce the problem (maybe i am doing a mistake i am not
aware of ) :
- untar the source
tar jxvf freeradius-server-3.0.7.tar.bz2
- configure flags used :
./configure --prefix=/usr/local/radius --disable-openssl-version-check
--with-openssl --with-experimental-modules
(clean install)
rm -rf /usr/local/radius
make ; make install
cd /usr/local/radius/etc/raddb/mods-enabled/
ln -svf ../mods-available/rediswho .
ln -svf ../mods-available/redis .
/usr/local/radius/sbin/radiusd -X
[snip]
}
# Loaded module rlm_rediswho
# Instantiating module "rediswho" from file
/usr/local/radius/etc/raddb/mods-enabled/rediswho
rediswho {
redis_module_instance = "redis"
trim_count = 15
/usr/local/radius/etc/raddb/mods-enabled/rediswho[10]: Configuration
item 'insert' must have a value
}
/usr/local/radius/etc/raddb/mods-enabled/rediswho[10]: Invalid
configuration for module "rediswho"
# -*- text -*-
#
# $Id: dba8c583f08db3490f74127d680c3d7ce5d1c572 $
#
# Configuration file for the "rediswho" module.
#
# This module tracks the last set of login sessions for a user.
#
rediswho {
# How many sessions to keep track of per user.
# If there are more than this number, older sessions are deleted.
trim_count = 15
# Expiry time in seconds. Any sessions which have not received
# an update in this time will be automatically expired.
expire_time = 86400
#
# Each subsection contains insert / trim / expire queries.
# The subsections are named after the contents of the
# Acct-Status-Type attribute. See dictionary.rfc2866 for names
# of the various Acct-Status-Type values, or look at the output
# of debug mode.
#
# This module supports *any* Acct-Status-Type. Just add a subsection
# of the appropriate name, along with insert / trim / expire queries.
#
Start {
insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
trim = "LTRIM %{User-Name} 0 ${..trim_count}"
expire = "EXPIRE %{User-Name} ${..expire_time}"
}
Interim-Update {
insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
trim = "LTRIM %{User-Name} 0 ${..trim_count}"
expire = "EXPIRE %{User-Name} ${..expire_time}"
}
Stop {
insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
trim = "LTRIM %{User-Name} 0 ${..trim_count}"
expire = "EXPIRE %{User-Name} ${..expire_time}"
}
}
On 02/25/15 19:10, Alan DeKok wrote:
> On Feb 25, 2015, at 11:47 AM, Ispas Paul <paul.ispas at akta.ro> wrote:
>> I am trying to test the rediswho module , freeradius 3.0.7, default
>> configuration
> It’s not the default configuration.
>
>> and have some issues.
>> Can anyone tell me what i am doing wrong ?
> You edited the default configuration and broke it. Don’t do that.
>> modules {
>> # Loaded module rlm_rediswho
>> # Instantiating module "rediswho" from file /etc/raddb/mods-enabled/rediswho
>> rediswho {
>> redis_module_instance = "redis"
>> trim_count = 5
>> /etc/raddb/mods-enabled/rediswho[10]: Configuration item 'insert' must
>> have a value
>> }
> That seems clear. You have a line saying “insert”. And the value for insert is empty.
>
> The default configuration DOES NOT have “insert” on line 10. So… you edited the default configuration and broke it.
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
More information about the Freeradius-Users
mailing list