2008-05-20 01:23:25 +00:00
|
|
|
--[[
|
|
|
|
|
|
|
|
Luci configuration model for statistics - collectd exec plugin configuration
|
|
|
|
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
|
|
|
|
]]--
|
|
|
|
|
2008-06-01 23:52:07 +00:00
|
|
|
m = Map("luci_statistics")
|
2008-05-20 01:23:25 +00:00
|
|
|
|
|
|
|
-- collectd_exec config section
|
2008-06-01 23:52:07 +00:00
|
|
|
s = m:section( NamedSection, "collectd_exec", "luci_statistics" )
|
2008-05-20 01:23:25 +00:00
|
|
|
|
|
|
|
-- collectd_exec.enable
|
2008-06-01 23:52:07 +00:00
|
|
|
enable = s:option( Flag, "enable" )
|
2008-05-20 01:23:25 +00:00
|
|
|
enable.default = 0
|
|
|
|
|
|
|
|
|
|
|
|
-- collectd_exec_input config section (Exec directives)
|
2008-06-01 23:52:07 +00:00
|
|
|
exec = m:section( TypedSection, "collectd_exec_input" )
|
2008-05-20 01:23:25 +00:00
|
|
|
exec.addremove = true
|
|
|
|
exec.anonymous = true
|
|
|
|
|
|
|
|
-- collectd_exec_input.cmdline
|
2008-06-01 23:52:07 +00:00
|
|
|
exec_cmdline = exec:option( Value, "cmdline" )
|
2008-05-20 01:23:25 +00:00
|
|
|
exec_cmdline.default = "/usr/bin/stat-dhcpusers"
|
|
|
|
|
|
|
|
-- collectd_exec_input.cmdline
|
2008-06-01 23:52:07 +00:00
|
|
|
exec_cmduser = exec:option( Value, "cmduser" )
|
2008-05-20 01:23:25 +00:00
|
|
|
exec_cmduser.default = "nobody"
|
|
|
|
exec_cmduser.rmempty = true
|
|
|
|
exec_cmduser.optional = true
|
|
|
|
|
|
|
|
-- collectd_exec_input.cmdline
|
2008-06-01 23:52:07 +00:00
|
|
|
exec_cmdgroup = exec:option( Value, "cmdgroup" )
|
2008-05-20 01:23:25 +00:00
|
|
|
exec_cmdgroup.default = "nogroup"
|
|
|
|
exec_cmdgroup.rmempty = true
|
|
|
|
exec_cmdgroup.optional = true
|
|
|
|
|
|
|
|
|
|
|
|
-- collectd_exec_notify config section (NotifyExec directives)
|
2008-06-01 23:52:07 +00:00
|
|
|
notify = m:section( TypedSection, "collectd_exec_notify" )
|
2008-05-20 01:23:25 +00:00
|
|
|
notify.addremove = true
|
|
|
|
notify.anonymous = true
|
|
|
|
|
|
|
|
-- collectd_notify_input.cmdline
|
2008-06-01 23:52:07 +00:00
|
|
|
notify_cmdline = notify:option( Value, "cmdline" )
|
2008-05-20 01:23:25 +00:00
|
|
|
notify_cmdline.default = "/usr/bin/stat-dhcpusers"
|
|
|
|
|
|
|
|
-- collectd_notify_input.cmdline
|
2008-06-01 23:52:07 +00:00
|
|
|
notify_cmduser = notify:option( Value, "cmduser" )
|
2008-05-20 01:23:25 +00:00
|
|
|
notify_cmduser.default = "nobody"
|
|
|
|
notify_cmduser.rmempty = true
|
|
|
|
notify_cmduser.optional = true
|
|
|
|
|
|
|
|
-- collectd_notify_input.cmdline
|
2008-06-01 23:52:07 +00:00
|
|
|
notify_cmdgroup = notify:option( Value, "cmdgroup" )
|
2008-05-20 01:23:25 +00:00
|
|
|
notify_cmdgroup.default = "nogroup"
|
|
|
|
notify_cmdgroup.rmempty = true
|
|
|
|
notify_cmdgroup.optional = true
|
|
|
|
|
|
|
|
|
|
|
|
return m
|