summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/luasrc/model/cbi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-27 12:23:39 +0000
committerSteven Barth <steven@midlink.org>2008-05-27 12:23:39 +0000
commitd35a620e9f5665a94967f4bd02c93581a1dd7e00 (patch)
treecbe7a9b9fe71e40d850c649361c87608d56ea48b /applications/luci-statistics/luasrc/model/cbi
parent5df565faba5eb0c26a7ce0e2d6e9092bf71cb1e8 (diff)
commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
Author: Felix Fietkau <nbd@openwrt.org> Date: Tue May 27 13:56:12 2008 +0200 rename src/ to luasrc/
Diffstat (limited to 'applications/luci-statistics/luasrc/model/cbi')
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua71
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua39
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua50
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua37
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua42
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua55
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua77
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua42
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua121
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua39
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua84
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua84
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua38
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua31
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua99
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua41
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua46
17 files changed, 996 insertions, 0 deletions
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua
new file mode 100644
index 000000000..e09a11df1
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua
@@ -0,0 +1,71 @@
+--[[
+
+Luci configuration model for statistics - general collectd 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$
+
+]]--
+
+require("luci.sys")
+
+
+m = Map("luci_statistics", "Collector Daemon",
+[[Collectd ist ein kleiner und flexibler Dienst zum Sammeln und Abfragen von Daten
+aus verschieden Quellen. Zur weiteren Verarbeitung werden die Daten in RRD Datenbanken
+gespeichert oder per Multicast Relaying über das Netzwerk versendet.]])
+
+-- general config section
+s = m:section( NamedSection, "general", "luci_statistics", "Allgemeine Einstellungen" )
+
+-- general.basedir (BaseDir)
+basedir = s:option( Value, "BaseDir", "Basisverzeichnis" )
+basedir.default = "/var/run/collectd"
+
+-- general.include (Include)
+include = s:option( Value, "Include", "Verzeichnis für Unterkonfigurationen" )
+include.default = "/etc/collectd/conf.d/*.conf"
+
+-- general.pidfile (PIDFile)
+pidfile = s:option( Value, "PIDFile", "PID-Datei für den Collector Dienst" )
+pidfile.default = "/var/run/collectd.pid"
+
+-- general.plugindir (PluginDir)
+plugindir = s:option( Value, "PluginDir", "Verzeichnis für die Collector-Plugins" )
+plugindir.default = "/usr/lib/collectd/"
+
+-- general.typesdb (TypesDB)
+typesdb = s:option( Value, "TypesDB", "Datenbank mit den Datenset-Beschreibungen" )
+typesdb.default = "/etc/collectd/types.db"
+
+-- general.interval (Interval)
+interval = s:option( Value, "Interval", "Abfrageintervall für die Datenerfassung", "Sekunden" )
+interval.default = 60
+interval.isnumber = true
+
+-- general.readthreads (ReadThreads)
+readthreads = s:option( Value, "ReadThreads", "Anzahl paralleler Prozesse für die Datenabfrage" )
+readthreads.default = 5
+readthreads.isnumber = true
+
+-- general.hostname (Hostname)
+hostname = s:option( Value, "Hostname", "Hostname zur Identifikation des Collector Dienstes (leer lassen um den Namen automatisch zu bestimmen)" )
+hostname.default = luci.sys.hostname()
+hostname.optional = true
+
+-- general.fqdnlookup (FQDNLookup)
+fqdnlookup = s:option( Flag, "FQDNLookup", "Versuchen den vollen Hostnamen dieser Installation herauszufinden" )
+fqdnlookup.enabled = "true"
+fqdnlookup.disabled = "false"
+fqdnlookup.default = "false"
+fqdnlookup.optional = true
+fqdnlookup:depends( "Hostname", "" )
+
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua
new file mode 100644
index 000000000..e1f2c351d
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua
@@ -0,0 +1,39 @@
+--[[
+
+Luci configuration model for statistics - collectd csv 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", "CSV Plugin",
+[[Das CSV-Plugin schreibt in regelmäßigen Abständen die gesammelten Daten als
+CSV-Dateien in das angegebene Verzeichnis. Der Speicherbedarf wächst dabei
+kontinuierlich!]])
+
+-- collectd_csv config section
+s = m:section( NamedSection, "collectd_csv", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_csv.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_csv.datadir (DataDir)
+datadir = s:option( Value, "DataDir", "Ablageverzeichnis für die CSV-Dateien" )
+datadir.default = "127.0.0.1"
+datadir:depends( "enable", 1 )
+
+-- collectd_csv.storerates (StoreRates)
+storerates = s:option( Flag, "StoreRates", "Werte nicht absolut, sondern als Raten speichern" )
+storerates.default = 0
+storerates:depends( "enable", 1 )
+
+return m
+
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua
new file mode 100644
index 000000000..6e35afcb3
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua
@@ -0,0 +1,50 @@
+--[[
+
+Luci configuration model for statistics - collectd df 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", "DF Plugin",
+[[Das DF-Plugin sammelt Informationen über den belegten und verfügbaren Speicherplatz auf den
+angegebenen Geräten, Mountpunkten oder Dateisystemtypen.]])
+
+-- collectd_df config section
+s = m:section( NamedSection, "collectd_df", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_df.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_df.devices (Device)
+devices = s:option( Value, "Devices", "Gerätedateien", "Einträge mit Leerzeichen trennen" )
+devices.default = "/dev/mtdblock/4"
+devices.rmempty = true
+devices:depends( "enable", 1 )
+
+-- collectd_df.mountpoints (MountPoint)
+mountpoints = s:option( Value, "MountPoints", "Mountpunkte", "Einträge mit Leerzeichen trennen" )
+mountpoints.default = "/jffs"
+mountpoints.rmempty = true
+mountpoints:depends( "enable", 1 )
+
+-- collectd_df.fstypes (FSType)
+fstypes = s:option( Value, "FSTypes", "Dateisystemtypen", "Einträge mit Leerzeichen trennen" )
+fstypes.default = "tmpfs"
+fstypes.rmempty = true
+fstypes:depends( "enable", 1 )
+
+-- collectd_df.ignoreselected (IgnoreSelected)
+ignoreselected = s:option( Flag, "IgnoreSelected", "Logik umkehren und alle Datenträger überwachen die nicht auf die obigen Kriterien zutreffen" )
+ignoreselected.default = 0
+ignoreselected:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua
new file mode 100644
index 000000000..587091fbd
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua
@@ -0,0 +1,37 @@
+--[[
+
+Luci configuration model for statistics - collectd disk 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", "Disk Plugin",
+[[Das Disk-Plugin sammelt Informationen über Augewählte Fesplatten.]])
+
+-- collectd_disk config section
+s = m:section( NamedSection, "collectd_disk", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_disk.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_disk.disks (Disk)
+devices = s:option( Value, "Disks", "Fesplatten oder Partitionen", "Einträge mit Leerzeichen trennen" )
+devices.default = "hda1 hdb"
+devices.rmempty = true
+devices:depends( "enable", 1 )
+
+-- collectd_disk.ignoreselected (IgnoreSelected)
+ignoreselected = s:option( Flag, "IgnoreSelected", "Logik umkehren und alle Datenträger und Partitionen überwachen die nicht auf die obigen Kriterien zutreffen" )
+ignoreselected.default = 0
+ignoreselected:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua
new file mode 100644
index 000000000..dc7f57d68
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua
@@ -0,0 +1,42 @@
+--[[
+
+Luci configuration model for statistics - collectd dns 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$
+
+]]--
+
+require("luci.sys")
+
+
+m = Map("luci_statistics", "DNS Plugin",
+[[Das DNS-Plugin nutzt die pcap Bibliothek um DNS-Verkehr zu analysieren.]])
+
+-- collectd_dns config section
+s = m:section( NamedSection, "collectd_dns", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_dns.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_dns.interfaces (Interface)
+interfaces = s:option( ListValue, "Interface", "Folgende Schnittstelle überwachen:" )
+interfaces:depends( "enable", 1 )
+interfaces:value("any")
+for k, v in pairs(luci.sys.net.devices()) do
+ interfaces:value(v)
+end
+
+-- collectd_dns.ignoresources (IgnoreSource)
+ignoresources = s:option( Value, "IgnoreSources", "Verkehr von folgenden IP Adressen ignorieren:", "mehrere Einträge mit Leerzeichen trennen" )
+ignoresources.default = "127.0.0.1"
+ignoresources:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
new file mode 100644
index 000000000..7b259e829
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
@@ -0,0 +1,55 @@
+--[[
+
+Luci configuration model for statistics - collectd email 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", "E-Mail Plugin",
+[[Das E-Mail-Plugin öffnet einen Unix-Socket über welchen E-Mail Statistiken an collectd
+übergeben werden können. Dieses Plugin ist primär für die Verwendung mit
+Mail::SpamAssassin::Plugin::Collectd gedacht, lässt sich aber auch anderweitig einsetzen.]])
+
+-- collectd_email config section
+s = m:section( NamedSection, "collectd_email", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_email.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_email.socketfile (SocketFile)
+socketfile = s:option( Value, "SocketFile", "Pfad für den Unix-Socket" )
+socketfile.default = "/var/run/collect-email.sock"
+socketfile:depends( "enable", 1 )
+
+-- collectd_email.socketgroup (SocketGroup)
+socketgroup = s:option( Value, "SocketGroup", "Dateibesitzergruppe für den Unix-Socket ändern" )
+socketgroup.default = "nobody"
+socketgroup.rmempty = true
+socketgroup.optional = true
+socketgroup:depends( "enable", 1 )
+
+-- collectd_email.socketperms (SocketPerms)
+socketperms = s:option( Value, "SocketPerms", "Dateiberechtigungen für den Unix-Socket ändern" )
+socketperms.default = "0770"
+socketperms.rmempty = true
+socketperms.optional = true
+socketperms:depends( "enable", 1 )
+
+-- collectd_email.maxconns (MaxConns)
+maxconns = s:option( Value, "MaxConns", "Maximale Anzahl paralleler Verbindungen", "Werte von 1 bis 16384" )
+maxconns.default = 5
+maxconns.isinteger = true
+maxconns.rmempty = true
+maxconns.optional = true
+maxconns:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua
new file mode 100644
index 000000000..d1fe0f0db
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua
@@ -0,0 +1,77 @@
+--[[
+
+Luci configuration model for statistics - collectd exec 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", "Exec Plugin",
+[[Das Exec-Plugin ermöglicht das Ausführen von externen Programmen um Werte einzulesen
+oder Aktionen beim Eintreten bestimmter Ereignisse anzustoßen.]])
+
+-- collectd_exec config section
+s = m:section( NamedSection, "collectd_exec", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_exec.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+
+-- collectd_exec_input config section (Exec directives)
+exec = m:section( TypedSection, "collectd_exec_input", "Befehl zum Einlesen von Daten hinzufügen",
+[[Hier können externe Kommandos definiert werden welche durch collectd gestartet werden um bestimmte
+Daten zu sammeln. Die Werte werden dabei von der Standardausgabe des Programmes gelesen.]])
+exec.addremove = true
+exec.anonymous = true
+
+-- collectd_exec_input.cmdline
+exec_cmdline = exec:option( Value, "cmdline", "Kommandozeile" )
+exec_cmdline.default = "/usr/bin/stat-dhcpusers"
+
+-- collectd_exec_input.cmdline
+exec_cmduser = exec:option( Value, "cmduser", "Als anderer Benutzer ausführen" )
+exec_cmduser.default = "nobody"
+exec_cmduser.rmempty = true
+exec_cmduser.optional = true
+
+-- collectd_exec_input.cmdline
+exec_cmdgroup = exec:option( Value, "cmdgroup", "Als andere Gruppe ausführen" )
+exec_cmdgroup.default = "nogroup"
+exec_cmdgroup.rmempty = true
+exec_cmdgroup.optional = true
+
+
+-- collectd_exec_notify config section (NotifyExec directives)
+notify = m:section( TypedSection, "collectd_exec_notify", "Befehl zum Ausgeben von Daten hinzufügen",
+[[Hier können externe Kommandos definiert werden welche zur Ausführung kommen sobald bestimmte
+Ereignise eintreten. Die Daten werden dabei an die Standardeingabe des aufgerufenen Programmes gesendet.
+Siehe dazu auch die Sektion "Limits".]])
+notify.addremove = true
+notify.anonymous = true
+
+-- collectd_notify_input.cmdline
+notify_cmdline = notify:option( Value, "cmdline", "Kommandozeile" )
+notify_cmdline.default = "/usr/bin/stat-dhcpusers"
+
+-- collectd_notify_input.cmdline
+notify_cmduser = notify:option( Value, "cmduser", "Als anderer Benutzer ausführen" )
+notify_cmduser.default = "nobody"
+notify_cmduser.rmempty = true
+notify_cmduser.optional = true
+
+-- collectd_notify_input.cmdline
+notify_cmdgroup = notify:option( Value, "cmdgroup", "Als andere Gruppe ausführen" )
+notify_cmdgroup.default = "nogroup"
+notify_cmdgroup.rmempty = true
+notify_cmdgroup.optional = true
+
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
new file mode 100644
index 000000000..3cd71a15d
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
@@ -0,0 +1,42 @@
+--[[
+
+Luci configuration model for statistics - collectd interface 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$
+
+]]--
+
+require("luci.sys")
+
+
+m = Map("luci_statistics", "Interface Plugin",
+[[Das Interface-Plugin sammelt Informationen zum Netzwerkverkehr auf den einzelnen Schnittstellen.]])
+
+-- collectd_interface config section
+s = m:section( NamedSection, "collectd_interface", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_interface.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_interface.interfaces (Interface)
+interfaces = s:option( MultiValue, "Interfaces", "Überwachte Schnittstellen", "mehrere Einträge mit Strg selektieren" )
+interfaces.widget = "select"
+interfaces:depends( "enable", 1 )
+for k, v in pairs(luci.sys.net.devices()) do
+ interfaces:value(v)
+end
+
+-- collectd_interface.ignoreselected (IgnoreSelected)
+ignoreselected = s:option( Flag, "IgnoreSelected", "Alle Schnittstellen außer ausgewählte überwachen" )
+ignoreselected.default = 0
+ignoreselected:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
new file mode 100644
index 000000000..4b6d9dbf4
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
@@ -0,0 +1,121 @@
+--[[
+
+Luci configuration model for statistics - collectd iptables 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$
+
+]]--
+
+require("luci.sys.iptparser")
+
+ip = luci.sys.iptparser.IptParser()
+chains = { }
+targets = { }
+
+for i, rule in ipairs( ip:find() ) do
+ chains[rule.chain] = true
+ targets[rule.target] = true
+end
+
+
+m = Map("luci_statistics", "Iptables Plugin",
+[[Das Iptables-Plugin ermöglicht die Überwachung bestimmter Firewallregeln um
+Werte wie die Anzahl der verarbeiteten Pakete oder die insgesamt erfasste Datenmenge
+zu speichern.]])
+
+-- collectd_iptables config section
+s = m:section( NamedSection, "collectd_iptables", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_iptables.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+
+-- collectd_iptables_match config section (Chain directives)
+rule = m:section( TypedSection, "collectd_iptables_match", "Regel hinzufügen",
+[[Hier werden die Kriterien festgelegt, nach welchen die Firewall-Regeln zur Ãœberwachung
+ausgewählt werden.]])
+rule.addremove = true
+rule.anonymous = true
+
+
+-- collectd_iptables_match.name
+rule_table = rule:option( Value, "name", "Name der Regel", "wird im Diagram verwendet" )
+
+-- collectd_iptables_match.table
+rule_table = rule:option( ListValue, "table", "Firewall-Tabelle" )
+rule_table.default = "filter"
+rule_table.rmempty = true
+rule_table.optional = true
+rule_table:value("")
+rule_table:value("filter")
+rule_table:value("nat")
+rule_table:value("mangle")
+
+
+-- collectd_iptables_match.chain
+rule_chain = rule:option( ListValue, "chain", "Firewall-Kette (Chain)" )
+rule_chain.rmempty = true
+rule_chain.optional = true
+rule_chain:value("")
+
+for chain, void in pairs( chains ) do
+ rule_chain:value( chain )
+end
+
+
+-- collectd_iptables_match.target
+rule_target = rule:option( ListValue, "target", "Firewall-Aktion (Target)" )
+rule_target.rmempty = true
+rule_target.optional = true
+rule_target:value("")
+
+for target, void in pairs( targets ) do
+ rule_target:value( target )
+end
+
+
+-- collectd_iptables_match.protocol
+rule_protocol = rule:option( ListValue, "protocol", "Netzwerkprotokoll" )
+rule_protocol.rmempty = true
+rule_protocol.optional = true
+rule_protocol:value("")
+rule_protocol:value("tcp")
+rule_protocol:value("udp")
+rule_protocol:value("icmp")
+
+-- collectd_iptables_match.source
+rule_source = rule:option( Value, "source", "Quell-IP-Bereich", "Bereich in CIDR Notation" )
+rule_source.default = "0.0.0.0/0"
+rule_source.rmempty = true
+rule_source.optional = true
+
+-- collectd_iptables_match.destination
+rule_destination = rule:option( Value, "destination", "Ziel-IP-Bereich", "Bereich in CIDR Notation" )
+rule_destination.default = "0.0.0.0/0"
+rule_destination.rmempty = true
+rule_destination.optional = true
+
+-- collectd_iptables_match.inputif
+rule_inputif = rule:option( Value, "inputif", "eingehende Schnittstelle", "z.B. eth0.0" )
+rule_inputif.rmempty = true
+rule_inputif.optional = true
+
+-- collectd_iptables_match.outputif
+rule_outputif = rule:option( Value, "outputif", "ausgehende Schnittstelle", "z.B. eth0.1" )
+rule_outputif.rmempty = true
+rule_outputif.optional = true
+
+-- collectd_iptables_match.options
+rule_options = rule:option( Value, "options", "Optionen", "z.B. reject-with tcp-reset" )
+rule_options.rmempty = true
+rule_options.optional = true
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua
new file mode 100644
index 000000000..2d15e5232
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua
@@ -0,0 +1,39 @@
+--[[
+
+Luci configuration model for statistics - collectd irq 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", "IRQ Plugin",
+[[Das IRQ-Plugin sammelt Informationen zur Auslastung einzelner Interrupts.
+Werden keine Interrupts angegeben, überwacht das Plugin alle vorhanden IRQs im System.
+]])
+
+-- collectd_irq config section
+s = m:section( NamedSection, "collectd_irq", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_irq.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_irq.irqs (Irq)
+irqs = s:option( Value, "Irqs", "Ãœberwachte Interrupts", "mehrere mit Leerzeichen trennen" )
+irqs.optional = true
+irqs:depends( "enable", 1 )
+
+-- collectd_irq.ignoreselected (IgnoreSelected)
+ignoreselected = s:option( Flag, "IgnoreSelected", "Alle Interrupts außer ausgewählte überwachen" )
+ignoreselected.default = 0
+ignoreselected.optional = "true"
+ignoreselected:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
new file mode 100644
index 000000000..a27def8eb
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
@@ -0,0 +1,84 @@
+--[[
+
+Luci configuration model for statistics - collectd netlink 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$
+
+]]--
+
+require("luci.sys")
+
+
+m = Map("luci_statistics", "Interface Plugin",
+[[Das Netlink-Plugin sammelt erweiterte Informationen wie Qdisc-, Class- und Filter-Werten auf einzelnen Schnittstellen.]])
+
+-- collectd_netlink config section
+s = m:section( NamedSection, "collectd_netlink", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_netlink.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_netlink.interfaces (Interface)
+interfaces = s:option( MultiValue, "Interfaces", "einfach Überwachte Schnittstellen", "mehrere Einträge mit Strg selektieren" )
+interfaces.widget = "select"
+interfaces.optional = true
+interfaces:depends( "enable", 1 )
+interfaces:value("")
+for i, v in ipairs(luci.sys.net.devices()) do
+ interfaces:value(v)
+end
+
+-- collectd_netlink.verboseinterfaces (VerboseInterface)
+verboseinterfaces = s:option( MultiValue, "VerboseInterfaces", "detailliert Überwachte Schnittstellen", "mehrere Einträge mit Strg selektieren" )
+verboseinterfaces.widget = "select"
+verboseinterfaces.optional = true
+verboseinterfaces:depends( "enable", 1 )
+verboseinterfaces:value("")
+for i, v in ipairs(luci.sys.net.devices()) do
+ verboseinterfaces:value(v)
+end
+
+-- collectd_netlink.qdiscs (QDisc)
+qdiscs = s:option( MultiValue, "QDiscs", "Queue Discipline auf Schnittstellen Überwachen", "mehrere Einträge mit Strg selektieren" )
+qdiscs.widget = "select"
+qdiscs.optional = true
+qdiscs:depends( "enable", 1 )
+qdiscs:value("")
+for i, v in ipairs(luci.sys.net.devices()) do
+ qdiscs:value(v)
+end
+
+-- collectd_netlink.classes (Class)
+classs = s:option( MultiValue, "Classes", "Shapingklassen auf Schnittstellen Überwachen", "mehrere Einträge mit Strg selektieren" )
+classs.widget = "select"
+classs.optional = true
+classs:depends( "enable", 1 )
+classs:value("")
+for i, v in ipairs(luci.sys.net.devices()) do
+ classs:value(v)
+end
+
+-- collectd_netlink.filters (Filter)
+filters = s:option( MultiValue, "Filters", "Filterklassen auf Schnittstellen Überwachen", "mehrere Einträge mit Strg selektieren" )
+filters.widget = "select"
+filters.optional = true
+filters:depends( "enable", 1 )
+filters:value("")
+for i, v in ipairs(luci.sys.net.devices()) do
+ filters:value(v)
+end
+
+-- collectd_netlink.ignoreselected (IgnoreSelected)
+ignoreselected = s:option( Flag, "IgnoreSelected", "Alle Schnittstellen außer ausgewählte überwachen" )
+ignoreselected.default = 0
+ignoreselected:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua
new file mode 100644
index 000000000..ab3c6303c
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua
@@ -0,0 +1,84 @@
+--[[
+
+Luci configuration model for statistics - collectd network 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", "Network Plugin",
+[[Das Network-Plugin ermöglicht den netzwerkgestützen Austausch von Statistikdaten.]])
+
+-- collectd_network config section
+s = m:section( NamedSection, "collectd_network", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_network.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+
+-- collectd_network_listen config section (Listen)
+listen = m:section( TypedSection, "collectd_network_listen", "Schnittstellen für eingehende Verbindungen",
+[[Legt fest auf welchen Schnittstellen bzw. IP-Adressen collectd auf eingehende Verbindungen wartet.]])
+listen.addremove = true
+listen.anonymous = true
+
+
+-- collectd_network_listen.host
+listen_host = listen:option( Value, "host", "Listen-Host", "Host-, IP- oder IPv6-Adresse" )
+listen_host.default = "0.0.0.0"
+
+-- collectd_network_listen.port
+listen_port = listen:option( Value, "port", "Listen-Port", "Partnummer 0 - 65535" )
+listen_port.default = 25826
+listen_port.isinteger = true
+listen_port.optional = true
+
+
+-- collectd_network_server config section (Server)
+server = m:section( TypedSection, "collectd_network_server", "Schnittstellen für ausgehende Verbindungen",
+[[Legt fest auf welchen Schnittstellen bzw. IP-Adressen collectd als Server agiert.]])
+server.addremove = true
+server.anonymous = true
+
+
+-- collectd_network_server.host
+server_host = server:option( Value, "host", "Server-Host", "Host-, IP- oder IPv6-Adresse" )
+server_host.default = "0.0.0.0"
+
+-- collectd_network_server.port
+server_port = server:option( Value, "port", "Server-Port", "Partnummer 0 - 65535" )
+server_port.default = 25826
+server_port.isinteger = true
+server_port.optional = true
+
+-- collectd_network.timetolive (TimeToLive)
+ttl = s:option( Value, "TimeToLive", "Time-to-Live für die Pakete", "Werte 0 bis 255" )
+ttl.default = 128
+ttl.isinteger = true
+ttl.optional = true
+ttl:depends( "enable", 1 )
+
+-- collectd_network.forward (Forward)
+forward = s:option( Flag, "Forward", "Weiterleitung zwischen verschiedenen Listen- und Server-Adressen" )
+forward.default = 0
+forward.optional = true
+forward:depends( "enable", 1 )
+
+-- collectd_network.forward (CacheFlush)
+forward = s:option( Value, "CacheFlush", "Löschintervall für temporäre Daten", "in Sekunden" )
+forward.default = 86400
+forward.isinteger = true
+forward.optional = true
+forward:depends( "enable", 1 )
+
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
new file mode 100644
index 000000000..334a0300d
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
@@ -0,0 +1,38 @@
+--[[
+
+Luci configuration model for statistics - collectd ping 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", "Ping Plugin",
+[[Das Ping-Plugin veranlasst periodische ICMP-Requests an die angegebenen Adressen und zeichnet
+Parameter wie Verfügbarkeit und Antwortzeiten auf.]])
+
+-- collectd_ping config section
+s = m:section( NamedSection, "collectd_ping", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_ping.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_ping.hosts (Host)
+hosts = s:option( Value, "Hosts", "Zieladressen", "Einträge durch Leerzeichen trennen" )
+hosts.default = "127.0.0.1"
+hosts:depends( "enable", 1 )
+
+-- collectd_ping.ttl (TTL)
+ttl = s:option( Value, "TTL", "Time-to-Live für die ICMP-Pakete (Werte 0 bis 255)" )
+ttl.isinteger = true
+ttl.default = 128
+ttl:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua
new file mode 100644
index 000000000..354cecaf1
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua
@@ -0,0 +1,31 @@
+--[[
+
+Luci configuration model for statistics - collectd processes 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", "Processes Plugin",
+[[Das Processes-Plugin sammelt Informationen über ausgewählte Prozesse auf diesem Gerät.]])
+
+-- collectd_processes config section
+s = m:section( NamedSection, "collectd_processes", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_processes.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_processes.processes (Process)
+processes = s:option( Value, "Processes", "Ãœberwachte Prozesse", "mehrere mit Leerzeichen trennen" )
+processes.default = "olsrd bmxd httpd dnsmasq dropbear tinc"
+processes:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
new file mode 100644
index 000000000..89adf52a7
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
@@ -0,0 +1,99 @@
+--[[
+
+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", "RRDTool Plugin",
+[[Das RRDTool-Plugin schreibt die gesammelten Werte in sogenannte RRD Datenbanken, welche die
+Grundlage für die Statistik-Diagramme bilden.<br /><br />
+<strong>Die Einstellungen auf dieser Seite sollten nur in Ausnahmefällen geändert werden,
+falsche Einstellungen führen zu einem sehr hohem Platzverbrauch im Temp-Verzeichnis und das
+Gerät kann nur noch im Failsafe-Modus repariert werden!</strong>]])
+
+-- collectd_rrdtool config section
+s = m:section( NamedSection, "collectd_rrdtool", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_rrdtool.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 1
+
+-- collectd_rrdtool.datadir (DataDir)
+datadir = s:option( Value, "DataDir", "Speicherort für die RRD Datenbanken" )
+datadir.default = "/tmp"
+datadir.rmempty = true
+datadir.optional = true
+datadir:depends( "enable", 1 )
+
+-- collectd_rrdtool.stepsize (StepSize)
+stepsize = s:option( Value, "StepSize", "Schritt-Interval", "in Sekunden" )
+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", "Heart-Beat-Interval", "in Sekunden" )
+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", 'Jeweils nur ein RRA anlegen', "reduziert die Größe der RRDs" )
+rrasingle.default = true
+rrasingle.rmempty = true
+rrasingle.optional = true
+rrasingle:depends( "enable", 1 )
+
+-- collectd_rrdtool.rratimespans (RRATimespan)
+rratimespans = s:option( Value, "RRATimespans", "Gespeicherte Zeitspannen", "in Sekunden; mehrere mit Leerzeichen trennen" )
+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", "Anzahl der Datenpunkte pro Zeitspanne" )
+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", "RRD XFiles Faktor" )
+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", "Daten für Zeitspanne cachen", "in Sekunden" )
+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", "Cache nach Zeitspanne leeren", "in Sekunden" )
+cacheflush.isinteger = true
+cacheflush.default = 100
+cacheflush.rmempty = true
+cacheflush.optional = true
+cacheflush:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua
new file mode 100644
index 000000000..079befac5
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua
@@ -0,0 +1,41 @@
+--[[
+
+Luci configuration model for statistics - collectd tcpconns 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", "Tcpconns Plugin",
+[[Das Tcpconns-Plugin zählt TCP-Verbindungen auf einzelnen Ports.]])
+
+-- collectd_tcpconns config section
+s = m:section( NamedSection, "collectd_tcpconns", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_tcpconns.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_tcpconns.listeningports (ListeningPorts)
+listeningports = s:option( Flag, "ListeningPorts", "Alle von lokalen Diensten genutzen Ports überwachen" )
+listeningports.default = 1
+listeningports:depends( "enable", 1 )
+
+-- collectd_tcpconns.localports (LocalPort)
+localports = s:option( Value, "LocalPorts", "Lokale Ports", "mit Leerzeichen trennen" )
+localports.optional = true
+localports:depends( "enable", 1 )
+
+-- collectd_tcpconns.remoteports (RemotePort)
+remoteports = s:option( Value, "RemotePorts", "Entfernte Ports", "mit Leerzeichen trennen" )
+remoteports.optional = true
+remoteports:depends( "enable", 1 )
+
+return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
new file mode 100644
index 000000000..dcedd381b
--- /dev/null
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
@@ -0,0 +1,46 @@
+--[[
+
+Luci configuration model for statistics - collectd unixsock 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", "Unixsock Plugin",
+[[Das Unixsock-Plugin öffnet einen Socket über welchen die gesammelten Werte des
+laufenden collectd Prozesses abgefragt werden können.]])
+
+-- collectd_unixsock config section
+s = m:section( NamedSection, "collectd_unixsock", "luci_statistics", "Pluginkonfiguration" )
+
+-- collectd_unixsock.enable
+enable = s:option( Flag, "enable", "Plugin aktivieren" )
+enable.default = 0
+
+-- collectd_unixsock.socketfile (SocketFile)
+socketfile = s:option( Value, "SocketFile", "Pfad für den Unix-Socket" )
+socketfile.default = "/var/run/collect-query.socket"
+socketfile:depends( "enable", 1 )
+
+-- collectd_unixsock.socketgroup (SocketGroup)
+socketgroup = s:option( Value, "SocketGroup", "Dateibesitzergruppe für den Unix-Socket ändern" )
+socketgroup.default = "nobody"
+socketgroup.rmempty = true
+socketgroup.optional = true
+socketgroup:depends( "enable", 1 )
+
+-- collectd_unixsock.socketperms (SocketPerms)
+socketperms = s:option( Value, "SocketPerms", "Dateiberechtigungen für den Unix-Socket ändern" )
+socketperms.default = "0770"
+socketperms.rmempty = true
+socketperms.optional = true
+socketperms:depends( "enable", 1 )
+
+return m