1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
4 m = Map("luci_statistics",
5 translate("Exec Plugin Configuration"),
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."
12 -- collectd_exec config section
13 s = m:section( NamedSection, "collectd_exec", "luci_statistics" )
15 -- collectd_exec.enable
16 enable = s:option( Flag, "enable", translate("Enable this plugin") )
20 -- collectd_exec_input config section (Exec directives)
21 exec = m:section( TypedSection, "collectd_exec_input",
22 translate("Add command for reading values"),
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."
31 -- collectd_exec_input.cmdline
32 exec_cmdline = exec:option( Value, "cmdline", translate("Script") )
33 exec_cmdline.default = "/usr/bin/stat-dhcpusers"
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
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
48 -- collectd_exec_notify config section (NotifyExec directives)
49 notify = m:section( TypedSection, "collectd_exec_notify",
50 translate("Add notification command"),
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."
57 notify.addremove = true
58 notify.anonymous = true
60 -- collectd_notify_input.cmdline
61 notify_cmdline = notify:option( Value, "cmdline", translate("Script") )
62 notify_cmdline.default = "/usr/bin/stat-dhcpusers"
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
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