Moved modules/* to mods-available/*
[freeradius.git] / raddb / mods-available / rediswho
1 # -*- text -*-
2 #
3 #  $Id$
4
5 #
6 #  Configuration file for the "rediswho" module.
7 #
8 #  This module tracks the last set of login sessions for a user.
9 #
10 rediswho {
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 }