2008-05-17 17:43:49 +00:00
|
|
|
--[[
|
|
|
|
|
|
|
|
Luci configuration model for statistics - general collectd 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-05-25 17:53:04 +00:00
|
|
|
require("luci.sys")
|
2008-05-17 17:43:49 +00:00
|
|
|
|
|
|
|
|
2008-06-01 23:52:07 +00:00
|
|
|
--[[
|
2008-05-20 01:23:25 +00:00
|
|
|
m = Map("luci_statistics", "Collector Daemon",
|
2008-06-01 23:52:07 +00:00
|
|
|
Collectd ist ein kleiner und flexibler Dienst zum Sammeln und Abfragen von Daten
|
2008-05-17 17:43:49 +00:00
|
|
|
aus verschieden Quellen. Zur weiteren Verarbeitung werden die Daten in RRD Datenbanken
|
2008-06-01 23:52:07 +00:00
|
|
|
gespeichert oder per Multicast Relaying über das Netzwerk versendet.)
|
|
|
|
]]--
|
|
|
|
m = Map("luci_statistics")
|
2008-05-17 17:43:49 +00:00
|
|
|
|
|
|
|
-- general config section
|
2008-06-01 23:52:07 +00:00
|
|
|
s = m:section( NamedSection, "collectd", "luci_statistics" )
|
|
|
|
|
|
|
|
-- general.hostname (Hostname)
|
|
|
|
hostname = s:option( Value, "Hostname" )
|
|
|
|
hostname.default = luci.sys.hostname()
|
|
|
|
hostname.optional = true
|
2008-05-17 17:43:49 +00:00
|
|
|
|
|
|
|
-- general.basedir (BaseDir)
|
2008-06-01 23:52:07 +00:00
|
|
|
basedir = s:option( Value, "BaseDir" )
|
2008-05-17 17:43:49 +00:00
|
|
|
basedir.default = "/var/run/collectd"
|
|
|
|
|
|
|
|
-- general.include (Include)
|
2008-06-01 23:52:07 +00:00
|
|
|
include = s:option( Value, "Include" )
|
2008-05-17 17:43:49 +00:00
|
|
|
include.default = "/etc/collectd/conf.d/*.conf"
|
|
|
|
|
|
|
|
-- general.plugindir (PluginDir)
|
2008-06-01 23:52:07 +00:00
|
|
|
plugindir = s:option( Value, "PluginDir" )
|
2008-05-17 17:43:49 +00:00
|
|
|
plugindir.default = "/usr/lib/collectd/"
|
|
|
|
|
2008-06-01 23:52:07 +00:00
|
|
|
-- general.pidfile (PIDFile)
|
|
|
|
pidfile = s:option( Value, "PIDFile" )
|
|
|
|
pidfile.default = "/var/run/collectd.pid"
|
|
|
|
|
2008-05-17 17:43:49 +00:00
|
|
|
-- general.typesdb (TypesDB)
|
2008-06-01 23:52:07 +00:00
|
|
|
typesdb = s:option( Value, "TypesDB" )
|
2008-05-17 17:43:49 +00:00
|
|
|
typesdb.default = "/etc/collectd/types.db"
|
|
|
|
|
|
|
|
-- general.interval (Interval)
|
2008-06-01 23:52:07 +00:00
|
|
|
interval = s:option( Value, "Interval" )
|
2008-05-17 17:43:49 +00:00
|
|
|
interval.default = 60
|
|
|
|
interval.isnumber = true
|
|
|
|
|
|
|
|
-- general.readthreads (ReadThreads)
|
2008-06-01 23:52:07 +00:00
|
|
|
readthreads = s:option( Value, "ReadThreads" )
|
2008-05-17 17:43:49 +00:00
|
|
|
readthreads.default = 5
|
|
|
|
readthreads.isnumber = true
|
|
|
|
|
|
|
|
-- general.fqdnlookup (FQDNLookup)
|
2008-06-01 23:52:07 +00:00
|
|
|
fqdnlookup = s:option( Flag, "FQDNLookup" )
|
2008-05-17 17:43:49 +00:00
|
|
|
fqdnlookup.enabled = "true"
|
|
|
|
fqdnlookup.disabled = "false"
|
|
|
|
fqdnlookup.default = "false"
|
|
|
|
fqdnlookup.optional = true
|
|
|
|
fqdnlookup:depends( "Hostname", "" )
|
|
|
|
|
|
|
|
|
|
|
|
return m
|