Globally reduce copyright headers
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / exec.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("luci_statistics",
5         translate("Exec Plugin Configuration"),
6         translate(
7                 "The exec plugin starts external commands to read values " ..
8                 "from or to notify external processes when certain threshold " ..
9                 "values have been reached."
10         ))
11
12 -- collectd_exec config section
13 s = m:section( NamedSection, "collectd_exec", "luci_statistics" )
14
15 -- collectd_exec.enable
16 enable = s:option( Flag, "enable", translate("Enable this plugin") )
17 enable.default = 0
18
19
20 -- collectd_exec_input config section (Exec directives)
21 exec = m:section( TypedSection, "collectd_exec_input",
22         translate("Add command for reading values"),
23         translate(
24                 "Here you can define external commands which will be " ..
25                 "started by collectd in order to read certain values. " ..
26                 "The values will be read from stdout."
27         ))
28 exec.addremove = true
29 exec.anonymous = true
30
31 -- collectd_exec_input.cmdline
32 exec_cmdline = exec:option( Value, "cmdline", translate("Script") )
33 exec_cmdline.default = "/usr/bin/stat-dhcpusers"
34
35 -- collectd_exec_input.cmdline
36 exec_cmduser = exec:option( Value, "cmduser", translate("User") )
37 exec_cmduser.default  = "nobody"
38 exec_cmduser.rmempty  = true
39 exec_cmduser.optional = true
40
41 -- collectd_exec_input.cmdline
42 exec_cmdgroup = exec:option( Value, "cmdgroup", translate("Group") )
43 exec_cmdgroup.default  = "nogroup"
44 exec_cmdgroup.rmempty  = true
45 exec_cmdgroup.optional = true
46
47
48 -- collectd_exec_notify config section (NotifyExec directives)
49 notify = m:section( TypedSection, "collectd_exec_notify",
50         translate("Add notification command"),
51         translate(
52                 "Here you can define external commands which will be " ..
53                 "started by collectd when certain threshold values have " ..
54                 "been reached. The values leading to invokation will be " ..
55                 "feeded to the the called programs stdin."
56         ))
57 notify.addremove = true
58 notify.anonymous = true
59
60 -- collectd_notify_input.cmdline
61 notify_cmdline = notify:option( Value, "cmdline", translate("Script") )
62 notify_cmdline.default = "/usr/bin/stat-dhcpusers"
63
64 -- collectd_notify_input.cmdline
65 notify_cmduser = notify:option( Value, "cmduser", translate("User") )
66 notify_cmduser.default  = "nobody"
67 notify_cmduser.rmempty  = true
68 notify_cmduser.optional = true
69
70 -- collectd_notify_input.cmdline
71 notify_cmdgroup = notify:option( Value, "cmdgroup", translate("Group") )
72 notify_cmdgroup.default  = "nogroup"
73 notify_cmdgroup.rmempty  = true
74 notify_cmdgroup.optional = true
75
76
77 return m