diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-05-21 03:56:35 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-05-21 03:56:35 +0000 |
commit | aed4df18d9ddb9c14ac8a1c0c82f9a90c3c853de (patch) | |
tree | 5a76ef46ed5914b7dc303beca51871d872331b67 /applications/luci-statistics | |
parent | 5306660d04e81b15d7338ccb3e5229ba1e6dc129 (diff) |
* ffluci/statistics: add cbi models for processes and tcpconns plugin
Diffstat (limited to 'applications/luci-statistics')
5 files changed, 95 insertions, 2 deletions
diff --git a/applications/luci-statistics/files/etc/config/luci_statistics b/applications/luci-statistics/files/etc/config/luci_statistics index 19e39c720..777f237b7 100644 --- a/applications/luci-statistics/files/etc/config/luci_statistics +++ b/applications/luci-statistics/files/etc/config/luci_statistics @@ -97,3 +97,12 @@ config 'collectd_network_listen' config 'collectd_network_server' option 'host' '0.0.0.0' +config 'statistics' 'collectd_processes' + option 'enable' '1' + option 'Processs' 'olsrd tincd bmxd' + +config 'statistics' 'collectd_tcpconns' + option 'enable' '1' + option 'ListeningPorts' '0' + option 'LocalPorts' '22 80 443' + diff --git a/applications/luci-statistics/files/usr/bin/stat-genconfig b/applications/luci-statistics/files/usr/bin/stat-genconfig index f5a3529ae..eb0688764 100755 --- a/applications/luci-statistics/files/usr/bin/stat-genconfig +++ b/applications/luci-statistics/files/usr/bin/stat-genconfig @@ -241,6 +241,18 @@ plugins = { network = config_network, + processes = { + { }, + { }, + { "Processs" } + }, + + tcpconns = { + { }, + { "ListeningPorts" }, + { "LocalPorts", "RemotePorts" } + }, + } 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 e69de29bb..9af3cdc95 100644 --- a/applications/luci-statistics/src/model/cbi/admin_statistics/processes.lua +++ b/applications/luci-statistics/src/model/cbi/admin_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.processs (Process) +processes = s:option( Value, "Processs", "Ü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/src/model/cbi/admin_statistics/tcpconns.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua index e69de29bb..1aaaf4459 100644 --- a/applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua +++ b/applications/luci-statistics/src/model/cbi/admin_statistics/tcpconns.lua @@ -0,0 +1,41 @@ +--[[ + +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", "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/src/model/menu/70luci-statistics.lua b/applications/luci-statistics/src/model/menu/70luci-statistics.lua index c28c1fc28..99429af53 100644 --- a/applications/luci-statistics/src/model/menu/70luci-statistics.lua +++ b/applications/luci-statistics/src/model/menu/70luci-statistics.lua @@ -19,13 +19,13 @@ act( "network", "Netzwerk" ) --act( "ntpd", "NTP Server" ) act( "ping", "Ping" ) --act( "powerdns", "Powerdns Server" ) ---act( "processes", "Prozesse" ) +act( "processes", "Prozesse" ) --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( "tcpconns", "TCP Verbindungen" ) --act( "unixsock", "UNIX Sockets" ) --act( "vmem", "Vmem" ) |