1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
--[[
Luci configuration model for statistics - collectd rrdtool 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$
]]--
m = Map("luci_statistics")
-- collectd_rrdtool config section
s = m:section( NamedSection, "collectd_rrdtool", "luci_statistics" )
-- collectd_rrdtool.enable
enable = s:option( Flag, "enable" )
enable.default = 1
-- collectd_rrdtool.datadir (DataDir)
datadir = s:option( Value, "DataDir" )
datadir.default = "/tmp"
datadir.rmempty = true
datadir.optional = true
datadir:depends( "enable", 1 )
-- collectd_rrdtool.stepsize (StepSize)
stepsize = s:option( Value, "StepSize" )
stepsize.default = 30
stepsize.isinteger = true
stepsize.rmempty = true
stepsize.optional = true
stepsize:depends( "enable", 1 )
-- collectd_rrdtool.heartbeat (HeartBeat)
heartbeat = s:option( Value, "HeartBeat" )
heartbeat.default = 60
heartbeat.isinteger = true
heartbeat.rmempty = true
heartbeat.optional = true
heartbeat:depends( "enable", 1 )
-- collectd_rrdtool.rrasingle (RRASingle)
rrasingle = s:option( Flag, "RRASingle" )
rrasingle.default = true
rrasingle.rmempty = true
rrasingle.optional = true
rrasingle:depends( "enable", 1 )
-- collectd_rrdtool.rratimespans (RRATimespan)
rratimespans = s:option( Value, "RRATimespans" )
rratimespans.default = "600 86400 604800 2678400 31622400"
rratimespans.rmempty = true
rratimespans.optional = true
rratimespans:depends( "enable", 1 )
-- collectd_rrdtool.rrarows (RRARows)
rrarows = s:option( Value, "RRARows" )
rrarows.isinteger = true
rrarows.default = 100
rrarows.rmempty = true
rrarows.optional = true
rrarows:depends( "enable", 1 )
-- collectd_rrdtool.xff (XFF)
xff = s:option( Value, "XFF" )
xff.default = 0.1
xff.isnumber = true
xff.rmempty = true
xff.optional = true
xff:depends( "enable", 1 )
-- collectd_rrdtool.cachetimeout (CacheTimeout)
cachetimeout = s:option( Value, "CacheTimeout" )
cachetimeout.isinteger = true
cachetimeout.default = 100
cachetimeout.rmempty = true
cachetimeout.optional = true
cachetimeout:depends( "enable", 1 )
-- collectd_rrdtool.cacheflush (CacheFlush)
cacheflush = s:option( Value, "CacheFlush" )
cacheflush.isinteger = true
cacheflush.default = 100
cacheflush.rmempty = true
cacheflush.optional = true
cacheflush:depends( "enable", 1 )
return m
|