summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/src/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-05-17 17:43:49 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-05-17 17:43:49 +0000
commit191848dae080ba19390925b7acefe99e00968ec3 (patch)
treea3060bb0985f5caebbf19e3651ebc8506e364743 /applications/luci-statistics/src/model
parent6eae1a0103a3d12dee4bc8753efee88af203dff3 (diff)
* ffluci: first work on statistics application based on collectd
Diffstat (limited to 'applications/luci-statistics/src/model')
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/csv.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/exec.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/index.lua71
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/iptables.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/ping.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua0
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua0
-rw-r--r--applications/luci-statistics/src/model/menu/70luci-statistics.lua40
10 files changed, 111 insertions, 0 deletions
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/csv.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/csv.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/csv.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/exec.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/exec.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/exec.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/index.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/index.lua
new file mode 100644
index 0000000000..743909c188
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/index.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("ffluci.sys")
+
+
+m = Map("collectd", "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", "collectd", "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 in 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 = ffluci.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/src/model/cbi/admin_statistics/interface.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/iptables.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/iptables.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/iptables.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/ping.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/ping.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/ping.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua
diff --git a/applications/luci-statistics/src/model/menu/70luci-statistics.lua b/applications/luci-statistics/src/model/menu/70luci-statistics.lua
new file mode 100644
index 0000000000..ded0b86760
--- /dev/null
+++ b/applications/luci-statistics/src/model/menu/70luci-statistics.lua
@@ -0,0 +1,40 @@
+add( "admin", "statistics", "Statistiken", 70 )
+--act( "apache", "Apache" )
+--act( "apcups", "Apcups" )
+--act( "ascent", "Ascent" )
+--act( "cpufreq", "Cpufreq" )
+act( "csv", "CSV" )
+--act( "df", "Speicher" )
+--act( "disk", "Festplatte" )
+act( "dns", "DNS" )
+--act( "email", "E-Mail" )
+act( "exec", "Exec" )
+--act( "hddtemp", "Festplattentemperatur" )
+act( "interface", "Netzwerkschnittstellen" )
+act( "iptables", "Firewall" )
+--act( "irq", "Interrupts" )
+--act( "libvirt", "Virtualisierung" )
+--act( "logfile", "Protokolldateien" )
+--act( "mbmon", "Mainboardsensoren" )
+--act( "memcached", "Memcached" )
+--act( "mysql", "MySQL" )
+--act( "netlink", "Netlink" )
+--act( "network", "Netzwerk" )
+--act( "nginx", "nginx Server" )
+--act( "ntpd", "NTP Server" )
+--act( "nut", "Nut" )
+--act( "perl", "Perl" )
+act( "ping", "Ping" )
+--act( "powerdns", "Powerdns Server" )
+act( "processes", "Prozessüberwachung" )
+--act( "rrdtool", "RRD Tool" )
+--act( "sensors", "Sensoren" )
+--act( "snmp", "SNMP Datenquellen" )
+--act( "syslog", "Systemlog" )
+--act( "tail", "Dateiverfolgung" )
+--act( "teamspeak2", "TeamSpeak 2" )
+act( "tcpconns", "TCP Verbindungen" )
+--act( "unixsock", "UNIX Sockets" )
+--act( "uuid", "UUID" )
+--act( "vmem", "Vmem" )
+--act( "vserver", "VServer" )