Globally reduce copyright headers
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / rrdtool.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("RRDTool Plugin Configuration"),
6 translate(
7 "The rrdtool plugin stores the collected data in rrd database " ..
8 "files, the foundation of the diagrams.<br /><br />" ..
9 "<strong>Warning: Setting the wrong values will result in a very " ..
10 "high memory consumption in the temporary directory. " ..
11 "This can render the device unusable!</strong>"
12 ))
13
14 -- collectd_rrdtool config section
15 s = m:section( NamedSection, "collectd_rrdtool", "luci_statistics" )
16
17 -- collectd_rrdtool.enable
18 enable = s:option( Flag, "enable", translate("Enable this plugin") )
19 enable.default = 1
20
21 -- collectd_rrdtool.datadir (DataDir)
22 datadir = s:option( Value, "DataDir", translate("Storage directory") )
23 datadir.default = "/tmp"
24 datadir.rmempty = true
25 datadir.optional = true
26 datadir:depends( "enable", 1 )
27
28 -- collectd_rrdtool.stepsize (StepSize)
29 stepsize = s:option( Value, "StepSize",
30 translate("RRD step interval"), translate("Seconds") )
31 stepsize.default = 30
32 stepsize.isinteger = true
33 stepsize.rmempty = true
34 stepsize.optional = true
35 stepsize:depends( "enable", 1 )
36
37 -- collectd_rrdtool.heartbeat (HeartBeat)
38 heartbeat = s:option( Value, "HeartBeat",
39 translate("RRD heart beat interval"), translate("Seconds") )
40 heartbeat.default = 60
41 heartbeat.isinteger = true
42 heartbeat.rmempty = true
43 heartbeat.optional = true
44 heartbeat:depends( "enable", 1 )
45
46 -- collectd_rrdtool.rrasingle (RRASingle)
47 rrasingle = s:option( Flag, "RRASingle",
48 translate("Only create average RRAs"), translate("reduces rrd size") )
49 rrasingle.default = true
50 rrasingle.rmempty = true
51 rrasingle.optional = true
52 rrasingle:depends( "enable", 1 )
53
54 -- collectd_rrdtool.rratimespans (RRATimespan)
55 rratimespans = s:option( Value, "RRATimespans",
56 translate("Stored timespans"), translate("seconds; multiple separated by space") )
57 rratimespans.default = "600 86400 604800 2678400 31622400"
58 rratimespans.rmempty = true
59 rratimespans.optional = true
60 rratimespans:depends( "enable", 1 )
61
62 -- collectd_rrdtool.rrarows (RRARows)
63 rrarows = s:option( Value, "RRARows", translate("Rows per RRA") )
64 rrarows.isinteger = true
65 rrarows.default = 100
66 rrarows.rmempty = true
67 rrarows.optional = true
68 rrarows:depends( "enable", 1 )
69
70 -- collectd_rrdtool.xff (XFF)
71 xff = s:option( Value, "XFF", translate("RRD XFiles Factor") )
72 xff.default = 0.1
73 xff.isnumber = true
74 xff.rmempty = true
75 xff.optional = true
76 xff:depends( "enable", 1 )
77
78 -- collectd_rrdtool.cachetimeout (CacheTimeout)
79 cachetimeout = s:option( Value, "CacheTimeout",
80 translate("Cache collected data for"), translate("Seconds") )
81 cachetimeout.isinteger = true
82 cachetimeout.default = 100
83 cachetimeout.rmempty = true
84 cachetimeout.optional = true
85 cachetimeout:depends( "enable", 1 )
86
87 -- collectd_rrdtool.cacheflush (CacheFlush)
88 cacheflush = s:option( Value, "CacheFlush",
89 translate("Flush cache after"), translate("Seconds") )
90 cacheflush.isinteger = true
91 cacheflush.default = 100
92 cacheflush.rmempty = true
93 cacheflush.optional = true
94 cacheflush:depends( "enable", 1 )
95
96 return m