From 191848dae080ba19390925b7acefe99e00968ec3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 17 May 2008 17:43:49 +0000 Subject: * ffluci: first work on statistics application based on collectd --- .../src/model/cbi/admin_statistics/csv.lua | 0 .../src/model/cbi/admin_statistics/dns.lua | 0 .../src/model/cbi/admin_statistics/exec.lua | 0 .../src/model/cbi/admin_statistics/index.lua | 71 ++++++++++++++++++++++ .../src/model/cbi/admin_statistics/interface.lua | 0 .../src/model/cbi/admin_statistics/iptables.lua | 0 .../src/model/cbi/admin_statistics/ping.lua | 0 .../src/model/cbi/admin_statistics/processes.lua | 0 .../src/model/cbi/admin_statistics/tcpconns.lua | 0 9 files changed, 71 insertions(+) create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/csv.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/exec.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/index.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/iptables.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/ping.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua create mode 100644 applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua (limited to 'applications/luci-statistics/src/model/cbi') 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 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 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 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 + +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 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 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 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 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 -- cgit v1.2.3