Update my email addresses in the license headers
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / unixsock.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("luci_statistics",
5         translate("Unixsock Plugin Configuration"),
6         translate(
7                 "The unixsock plugin creates a unix socket which can be used " ..
8                 "to read collected data from a running collectd instance."
9         ))
10
11 -- collectd_unixsock config section
12 s = m:section( NamedSection, "collectd_unixsock", "luci_statistics" )
13
14 -- collectd_unixsock.enable
15 enable = s:option( Flag, "enable", translate("Enable this plugin") )
16 enable.default = 0
17
18 -- collectd_unixsock.socketfile (SocketFile)
19 socketfile = s:option( Value, "SocketFile" )
20 socketfile.default = "/var/run/collect-query.socket"
21 socketfile:depends( "enable", 1 )
22
23 -- collectd_unixsock.socketgroup (SocketGroup)
24 socketgroup = s:option( Value, "SocketGroup" )
25 socketgroup.default  = "nobody"
26 socketgroup.rmempty  = true
27 socketgroup.optional = true
28 socketgroup:depends( "enable", 1 )
29
30 -- collectd_unixsock.socketperms (SocketPerms)
31 socketperms = s:option( Value, "SocketPerms" )
32 socketperms.default  = "0770"
33 socketperms.rmempty  = true
34 socketperms.optional = true
35 socketperms:depends( "enable", 1 )
36
37 return m