3 Luci configuration model for statistics - collectd network 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
17 m = Map("luci_statistics")
19 -- collectd_network config section
20 s = m:section( NamedSection, "collectd_network", "luci_statistics" )
22 -- collectd_network.enable
23 enable = s:option( Flag, "enable" )
27 -- collectd_network_listen config section (Listen)
28 listen = m:section( TypedSection, "collectd_network_listen" )
29 listen.addremove = true
30 listen.anonymous = true
32 -- collectd_network_listen.host
33 listen_host = listen:option( Value, "host" )
34 listen_host.default = "0.0.0.0"
36 -- collectd_network_listen.port
37 listen_port = listen:option( Value, "port" )
38 listen_port.default = 25826
39 listen_port.isinteger = true
40 listen_port.optional = true
43 -- collectd_network_server config section (Server)
44 server = m:section( TypedSection, "collectd_network_server" )
45 server.addremove = true
46 server.anonymous = true
48 -- collectd_network_server.host
49 server_host = server:option( Value, "host" )
50 server_host.default = "0.0.0.0"
52 -- collectd_network_server.port
53 server_port = server:option( Value, "port" )
54 server_port.default = 25826
55 server_port.isinteger = true
56 server_port.optional = true
58 -- collectd_network.timetolive (TimeToLive)
59 ttl = s:option( Value, "TimeToLive" )
63 ttl:depends( "enable", 1 )
65 -- collectd_network.forward (Forward)
66 forward = s:option( Flag, "Forward" )
68 forward.optional = true
69 forward:depends( "enable", 1 )
71 -- collectd_network.cacheflush (CacheFlush)
72 cacheflush = s:option( Value, "CacheFlush" )
73 cacheflush.default = 86400
74 cacheflush.isinteger = true
75 cacheflush.optional = true
76 cacheflush:depends( "enable", 1 )