rlm_rediswho
Synopsis
Processing Sections
accounting
When listed in the accounting section, the rediswho module will
store radutmp style user login information in a
redis database.
- Return codes
-
noopThe packet contained noAcct-Status-Typeattribute, or the value of the attribute is unknown. -
failThe module was unable to connect to the redis database. -
okThe module wrote the users login information into the redis database.
Expansions
None.
Directives
- Syntax
-
redis_module_instance = string
- Default
-
redis - Description
-
The name of the redis module instance.
- Syntax
-
trim_count = integer
- Default
-
15
- Description
-
The number of sessions of which to keep track per user. If there are more than this number, then older sessions are deleted.
Start
Each subsection contains insert, trim, and 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. This module supports any
Acct-Status-Type. Just add a subsection of the appropriate name,
along with insert, trim, and expire queries
- Syntax
-
expire = string
- Default
-
EXPIRE %{User-Name} ${..expire-time}
- Description
-
Redis command to expire the user’s session.
- Syntax
-
insert = string
- Default
-
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}
- Description
-
Redis command to insert the user’s session data.
- Syntax
-
trim = string
- Default
-
LTRIM %{User-Name} 0 ${..trim-count}
- Description
-
Redis command to delete older user sessions.
Interim-Update
- Syntax
-
expire = string
- Default
-
EXPIRE %{User-Name} ${..expire-time}
- Description
-
Redis command to expire the user’s session.
- Syntax
-
insert = string
- Default
-
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}
- Description
-
Redis command to insert the user’s session data.
- Syntax
-
trim = string
- Default
-
LTRIM %{User-Name} 0 ${..trim-count}
- Description
-
Redis command to delete older user sessions.
Stop
- Syntax
-
expire = string
- Default
-
EXPIRE %{User-Name} ${..expire-time}
- Description
-
Redis command to expire the user’s session.
- Syntax
-
insert = string
- Default
-
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}
- Description
-
Redis command to insert the user’s session data.
- Syntax
-
trim = string
- Default
-
LTRIM %{User-Name} 0 ${..trim-count}
- Description
-
Redis command to delete older user sessions.