* luci/statistics: replace load() with loadc() since german translation is now available
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / collectd.lua
1 --[[
2
3 Luci configuration model for statistics - general collectd configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 ]]--
15
16 require("luci.sys")
17
18
19 --[[
20 m = Map("luci_statistics", "Collector Daemon",
21 Collectd ist ein kleiner und flexibler Dienst zum Sammeln und Abfragen von Daten
22 aus verschieden Quellen. Zur weiteren Verarbeitung werden die Daten in RRD Datenbanken
23 gespeichert oder per Multicast Relaying über das Netzwerk versendet.)
24 ]]--
25 m = Map("luci_statistics")
26
27 -- general config section
28 s = m:section( NamedSection, "collectd", "luci_statistics" )
29
30 -- general.hostname (Hostname)
31 hostname = s:option( Value, "Hostname" )
32 hostname.default = luci.sys.hostname()
33 hostname.optional = true
34
35 -- general.basedir (BaseDir)
36 basedir = s:option( Value, "BaseDir" )
37 basedir.default = "/var/run/collectd"
38
39 -- general.include (Include)
40 include = s:option( Value, "Include" )
41 include.default = "/etc/collectd/conf.d/*.conf"
42
43 -- general.plugindir (PluginDir)
44 plugindir = s:option( Value, "PluginDir" )
45 plugindir.default = "/usr/lib/collectd/"
46
47 -- general.pidfile (PIDFile)
48 pidfile = s:option( Value, "PIDFile" )
49 pidfile.default = "/var/run/collectd.pid"
50
51 -- general.typesdb (TypesDB)
52 typesdb = s:option( Value, "TypesDB" )
53 typesdb.default = "/etc/collectd/types.db"
54
55 -- general.interval (Interval)
56 interval = s:option( Value, "Interval" )
57 interval.default = 60
58 interval.isnumber = true
59
60 -- general.readthreads (ReadThreads)
61 readthreads = s:option( Value, "ReadThreads" )
62 readthreads.default = 5
63 readthreads.isnumber = true
64
65 -- general.fqdnlookup (FQDNLookup)
66 fqdnlookup = s:option( Flag, "FQDNLookup" )
67 fqdnlookup.enabled = "true"
68 fqdnlookup.disabled = "false"
69 fqdnlookup.default = "false"
70 fqdnlookup.optional = true
71 fqdnlookup:depends( "Hostname", "" )
72
73
74 return m