3 Luci configuration model for statistics - collectd dns 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 require("ffluci.model.uci")
19 m = Map("luci_statistics", "DNS Plugin",
20 [[Das DNS-Plugin nutzt die pcap Bibliothek um DNS-Verkehr zu analysieren.]])
22 -- collectd_dns config section
23 s = m:section( NamedSection, "collectd_dns", "luci_statistics", "Pluginkonfiguration" )
25 -- collectd_dns.enable
26 enable = s:option( Flag, "enable", "Plugin aktivieren" )
29 -- collectd_dns.interfaces (Interface)
30 interfaces = s:option( ListValue, "Interface", "Folgende Schnittstelle überwachen:" )
31 interfaces:depends( "enable", 1 )
32 interfaces:value("any")
33 for k, v in pairs(ffluci.model.uci.sections("network")) do
34 if v[".type"] == "interface" and k ~= "loopback" then
39 -- collectd_dns.ignoresources (IgnoreSource)
40 ignoresources = s:option( Value, "IgnoreSources", "Verkehr von folgenden IP Adressen ignorieren:", "mehrere Einträge mit Leerzeichen trennen" )
41 ignoresources.default = "127.0.0.1"
42 ignoresources:depends( "enable", 1 )