blob: 0471d263668cc1a9dcff74284b93f70347273faa [file] [log] [blame]
Chetan Gaonker7f4bf742016-05-04 15:56:08 -07001# -*- text -*-
2#
3# $Id: dba8c583f08db3490f74127d680c3d7ce5d1c572 $
4
5#
6# Configuration file for the "rediswho" module.
7#
8# This module tracks the last set of login sessions for a user.
9#
10rediswho {
11 # How many sessions to keep track of per user.
12 # If there are more than this number, older sessions are deleted.
13 trim_count = 15
14
15 # Expiry time in seconds. Any sessions which have not received
16 # an update in this time will be automatically expired.
17 expire_time = 86400
18
19 #
20 # Each subsection contains insert / trim / expire queries.
21 # The subsections are named after the contents of the
22 # Acct-Status-Type attribute. See dictionary.rfc2866 for names
23 # of the various Acct-Status-Type values, or look at the output
24 # of debug mode.
25 #
26 # This module supports *any* Acct-Status-Type. Just add a subsection
27 # of the appropriate name, along with insert / trim / expire queries.
28 #
29 Start {
30 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}"
31 trim = "LTRIM %{User-Name} 0 ${..trim_count}"
32 expire = "EXPIRE %{User-Name} ${..expire_time}"
33 }
34
35 Interim-Update {
36 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}"
37 trim = "LTRIM %{User-Name} 0 ${..trim_count}"
38 expire = "EXPIRE %{User-Name} ${..expire_time}"
39 }
40
41 Stop {
42 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}"
43 trim = "LTRIM %{User-Name} 0 ${..trim_count}"
44 expire = "EXPIRE %{User-Name} ${..expire_time}"
45 }
46}