3 Luci configuration model for statistics - collectd rrdtool plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
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
10 http://www.apache.org/licenses/LICENSE-2.0
16 m = Map("luci_statistics",
17 translate("RRDTool Plugin Configuration"),
19 "The rrdtool plugin stores the collected data in rrd database " ..
20 "files, the foundation of the diagrams.<br /><br />" ..
21 "<strong>Warning: Setting the wrong values will result in a very " ..
22 "high memory consumption in the temporary directory. " ..
23 "This can render the device unusable!</strong>"
26 -- collectd_rrdtool config section
27 s = m:section( NamedSection, "collectd_rrdtool", "luci_statistics" )
29 -- collectd_rrdtool.enable
30 enable = s:option( Flag, "enable", translate("Enable this plugin") )
33 -- collectd_rrdtool.datadir (DataDir)
34 datadir = s:option( Value, "DataDir", translate("Storage directory") )
35 datadir.default = "/tmp"
36 datadir.rmempty = true
37 datadir.optional = true
38 datadir:depends( "enable", 1 )
40 -- collectd_rrdtool.stepsize (StepSize)
41 stepsize = s:option( Value, "StepSize",
42 translate("RRD step interval"), translate("Seconds") )
44 stepsize.isinteger = true
45 stepsize.rmempty = true
46 stepsize.optional = true
47 stepsize:depends( "enable", 1 )
49 -- collectd_rrdtool.heartbeat (HeartBeat)
50 heartbeat = s:option( Value, "HeartBeat",
51 translate("RRD heart beat interval"), translate("Seconds") )
52 heartbeat.default = 60
53 heartbeat.isinteger = true
54 heartbeat.rmempty = true
55 heartbeat.optional = true
56 heartbeat:depends( "enable", 1 )
58 -- collectd_rrdtool.rrasingle (RRASingle)
59 rrasingle = s:option( Flag, "RRASingle",
60 translate("Only create average RRAs"), translate("reduces rrd size") )
61 rrasingle.default = true
62 rrasingle.rmempty = true
63 rrasingle.optional = true
64 rrasingle:depends( "enable", 1 )
66 -- collectd_rrdtool.rratimespans (RRATimespan)
67 rratimespans = s:option( Value, "RRATimespans",
68 translate("Stored timespans"), translate("seconds; multiple separated by space") )
69 rratimespans.default = "600 86400 604800 2678400 31622400"
70 rratimespans.rmempty = true
71 rratimespans.optional = true
72 rratimespans:depends( "enable", 1 )
74 -- collectd_rrdtool.rrarows (RRARows)
75 rrarows = s:option( Value, "RRARows", translate("Rows per RRA") )
76 rrarows.isinteger = true
78 rrarows.rmempty = true
79 rrarows.optional = true
80 rrarows:depends( "enable", 1 )
82 -- collectd_rrdtool.xff (XFF)
83 xff = s:option( Value, "XFF", translate("RRD XFiles Factor") )
88 xff:depends( "enable", 1 )
90 -- collectd_rrdtool.cachetimeout (CacheTimeout)
91 cachetimeout = s:option( Value, "CacheTimeout",
92 translate("Cache collected data for"), translate("Seconds") )
93 cachetimeout.isinteger = true
94 cachetimeout.default = 100
95 cachetimeout.rmempty = true
96 cachetimeout.optional = true
97 cachetimeout:depends( "enable", 1 )
99 -- collectd_rrdtool.cacheflush (CacheFlush)
100 cacheflush = s:option( Value, "CacheFlush",
101 translate("Flush cache after"), translate("Seconds") )
102 cacheflush.isinteger = true
103 cacheflush.default = 100
104 cacheflush.rmempty = true
105 cacheflush.optional = true
106 cacheflush:depends( "enable", 1 )