summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/src/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-05-22 13:09:45 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-05-22 13:09:45 +0000
commit0e3371976118cc1cd36cb5d5cf5c379fe19e0020 (patch)
tree0f5959298003607813303d0a3252185d05e87b59 /applications/luci-statistics/src/model
parent68fd8eacdd84a40cda9535ad11cce54979cfc93f (diff)
* ffluci/statistics: add cbi model for rrdtool, fix stat-genconfig to allow correctly spelled list value parameters, updated default config
Diffstat (limited to 'applications/luci-statistics/src/model')
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua4
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua2
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/rrdtool.lua99
-rw-r--r--applications/luci-statistics/src/model/menu/70luci-statistics.lua2
4 files changed, 103 insertions, 4 deletions
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua
index f027f3778..9e1b86d4d 100644
--- a/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua
@@ -56,8 +56,8 @@ for i, v in ipairs(ffluci.sys.net.devices()) do
qdiscs:value(v)
end
--- collectd_netlink.classs (Class)
-classs = s:option( MultiValue, "Classs", "Shapingklassen auf Schnittstellen Überwachen", "mehrere Einträge mit Strg selektieren" )
+-- 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 )
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua
index 9af3cdc95..5e9735385 100644
--- a/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua
@@ -24,7 +24,7 @@ enable = s:option( Flag, "enable", "Plugin aktivieren" )
enable.default = 0
-- collectd_processes.processs (Process)
-processes = s:option( Value, "Processs", "Überwachte Prozesse", "mehrere mit Leerzeichen trennen" )
+processes = s:option( Value, "Processes", "Überwachte Prozesse", "mehrere mit Leerzeichen trennen" )
processes.default = "olsrd bmxd httpd dnsmasq dropbear tinc"
processes:depends( "enable", 1 )
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/rrdtool.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/rrdtool.lua
new file mode 100644
index 000000000..89adf52a7
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_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/src/model/menu/70luci-statistics.lua b/applications/luci-statistics/src/model/menu/70luci-statistics.lua
index bc36d7122..e53a0a0d4 100644
--- a/applications/luci-statistics/src/model/menu/70luci-statistics.lua
+++ b/applications/luci-statistics/src/model/menu/70luci-statistics.lua
@@ -20,7 +20,7 @@ act( "network", "Netzwerk" )
act( "ping", "Ping" )
--act( "powerdns", "Powerdns Server" )
act( "processes", "Prozesse" )
---act( "rrdtool", "RRD Tool" )
+act( "rrdtool", "RRDTool" )
--act( "sensors", "Sensoren" )
--act( "snmp", "SNMP Datenquellen" )
--act( "syslog", "Systemlog" )