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",
18 translate("Network Plugin Configuration"),
20 "The network plugin provides network based communication between " ..
21 "different collectd instances. Collectd can operate both in client " ..
22 "and server mode. In client mode locally collected date is " ..
23 "transferred to a collectd server instance, in server mode the " ..
24 "local instance receives data from other hosts."
27 -- collectd_network config section
28 s = m:section( NamedSection, "collectd_network", "luci_statistics" )
30 -- collectd_network.enable
31 enable = s:option( Flag, "enable", translate("Enable this plugin") )
35 -- collectd_network_listen config section (Listen)
36 listen = m:section( TypedSection, "collectd_network_listen",
37 translate("Listener interfaces"),
39 "This section defines on which interfaces collectd will wait " ..
40 "for incoming connections."
42 listen.addremove = true
43 listen.anonymous = true
45 -- collectd_network_listen.host
46 listen_host = listen:option( Value, "host", translate("Listen host") )
47 listen_host.default = "0.0.0.0"
49 -- collectd_network_listen.port
50 listen_port = listen:option( Value, "port", translate("Listen port") )
51 listen_port.default = 25826
52 listen_port.isinteger = true
53 listen_port.optional = true
56 -- collectd_network_server config section (Server)
57 server = m:section( TypedSection, "collectd_network_server",
58 translate("server interfaces"),
60 "This section defines to which servers the locally collected " ..
63 server.addremove = true
64 server.anonymous = true
66 -- collectd_network_server.host
67 server_host = server:option( Value, "host", translate("Server host") )
68 server_host.default = "0.0.0.0"
70 -- collectd_network_server.port
71 server_port = server:option( Value, "port", translate("Server port") )
72 server_port.default = 25826
73 server_port.isinteger = true
74 server_port.optional = true
76 -- collectd_network.timetolive (TimeToLive)
77 ttl = s:option( Value, "TimeToLive", translate("TTL for network packets") )
81 ttl:depends( "enable", 1 )
83 -- collectd_network.forward (Forward)
84 forward = s:option( Flag, "Forward", translate("Forwarding between listen and server addresses") )
86 forward.optional = true
87 forward:depends( "enable", 1 )
89 -- collectd_network.cacheflush (CacheFlush)
90 cacheflush = s:option( Value, "CacheFlush",
91 translate("Cache flush interval"), translate("Seconds") )
92 cacheflush.default = 86400
93 cacheflush.isinteger = true
94 cacheflush.optional = true
95 cacheflush:depends( "enable", 1 )