commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / email.lua
1 --[[
2
3 Luci configuration model for statistics - collectd email plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 ]]--
15
16 m = Map("luci_statistics", "E-Mail Plugin",
17 [[Das E-Mail-Plugin öffnet einen Unix-Socket über welchen E-Mail Statistiken an collectd
18 übergeben werden können. Dieses Plugin ist primär für die Verwendung mit
19 Mail::SpamAssassin::Plugin::Collectd gedacht, lässt sich aber auch anderweitig einsetzen.]])
20
21 -- collectd_email config section
22 s = m:section( NamedSection, "collectd_email", "luci_statistics", "Pluginkonfiguration" )
23
24 -- collectd_email.enable
25 enable = s:option( Flag, "enable", "Plugin aktivieren" )
26 enable.default = 0
27
28 -- collectd_email.socketfile (SocketFile)
29 socketfile = s:option( Value, "SocketFile", "Pfad für den Unix-Socket" )
30 socketfile.default = "/var/run/collect-email.sock"
31 socketfile:depends( "enable", 1 )
32
33 -- collectd_email.socketgroup (SocketGroup)
34 socketgroup = s:option( Value, "SocketGroup", "Dateibesitzergruppe für den Unix-Socket ändern" )
35 socketgroup.default  = "nobody"
36 socketgroup.rmempty  = true
37 socketgroup.optional = true
38 socketgroup:depends( "enable", 1 )
39
40 -- collectd_email.socketperms (SocketPerms)
41 socketperms = s:option( Value, "SocketPerms", "Dateiberechtigungen für den Unix-Socket ändern" )
42 socketperms.default  = "0770"
43 socketperms.rmempty  = true
44 socketperms.optional = true
45 socketperms:depends( "enable", 1 )
46
47 -- collectd_email.maxconns (MaxConns)
48 maxconns = s:option( Value, "MaxConns", "Maximale Anzahl paralleler Verbindungen", "Werte von 1 bis 16384" )
49 maxconns.default   = 5
50 maxconns.isinteger = true
51 maxconns.rmempty   = true
52 maxconns.optional  = true
53 maxconns:depends( "enable", 1 )
54
55 return m