Sample configuration for the rediswho module
authorGabriel Blanchard <gabe@teksavvy.ca>
Thu, 13 Jan 2011 22:47:27 +0000 (23:47 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 13 Jan 2011 23:13:01 +0000 (00:13 +0100)
raddb/modules/rediswho [new file with mode: 0644]

diff --git a/raddb/modules/rediswho b/raddb/modules/rediswho
new file mode 100644 (file)
index 0000000..470dbad
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- text -*-
+#
+#  $Id$
+
+#
+#  Configuration file for the "rediswho" module.
+#
+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
+
+       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}"
+       start-trim =   "LTRIM %{User-Name} 0 ${trim-count}"
+       start-expire = "EXPIRE %{User-Name} ${expire-time}"
+
+       alive-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}"
+       alive-trim =   "LTRIM %{User-Name} 0 ${trim-count}"
+       alive-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}"
+       stop-trim =   "LTRIM %{User-Name} 0 ${trim-count}"
+       stop-expire = "EXPIRE %{User-Name} ${expire-time}"
+}