* luci/statistics: implement support for the load plugin
This commit is contained in:
parent
0d4b628c7b
commit
de2e0ce10c
6 changed files with 95 additions and 1 deletions
|
@ -44,7 +44,7 @@ function index()
|
|||
-- our collectd menu
|
||||
local collectd_menu = {
|
||||
output = { "rrdtool", "network", "unixsock", "csv" },
|
||||
system = { "exec", "email", "cpu", "df", "disk", "irq", "processes" },
|
||||
system = { "exec", "email", "cpu", "df", "disk", "irq", "processes", "load" },
|
||||
network = { "interface", "netlink", "iptables", "tcpconns", "ping", "dns", "wireless" }
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ stat_exec = "Exec"
|
|||
stat_rrdtool = "RRDTool"
|
||||
stat_network = "Netzwerk"
|
||||
stat_csv = "CSV Ausgabe"
|
||||
stat_load = "Systemlast"
|
||||
|
||||
|
||||
--
|
||||
|
@ -136,6 +137,12 @@ stat_dg_title_irq = "%H: Interrupts"
|
|||
stat_dg_label_irq = "Aufrufe/s"
|
||||
stat_ds_irq = "IRQ %di"
|
||||
|
||||
stat_dg_title_load = "%H: Systemlast"
|
||||
stat_dg_label_load = "Last"
|
||||
stat_ds_load__shortterm = "1 Minute"
|
||||
stat_ds_load__midterm = "5 Minuten"
|
||||
stat_ds_load__longterm = "15 Minuten"
|
||||
|
||||
|
||||
--
|
||||
-- CBI translations
|
||||
|
@ -306,6 +313,14 @@ lucistatistics_collectdirq_irqs = "Interrups überwachen"
|
|||
lucistatistics_collectdirq_irqs_desc = "mehrere mit Leerzeichen trennen"
|
||||
lucistatistics_collectdirq_ignoreselected = "Alle außer Ausgewählte überwachen"
|
||||
|
||||
-- load plugin
|
||||
lucistatistics_collectdload = "Load Plugin Konfiguration"
|
||||
lucistatistics_collectdload_desc = [[
|
||||
Das Load-Plugin sammelt Informationen über die allgemeine Systemlast.
|
||||
]]
|
||||
|
||||
lucistatistics_collectdload_enable = "Plugin aktivieren"
|
||||
|
||||
-- netlink plugin
|
||||
lucistatistics_collectdnetlink = "Netlink Plugin Konfiguration"
|
||||
lucistatistics_collectdnetlink_desc = [[
|
||||
|
|
|
@ -46,6 +46,7 @@ stat_exec = "Exec"
|
|||
stat_rrdtool = "RRDTool"
|
||||
stat_network = "Network"
|
||||
stat_csv = "CSV Output"
|
||||
stat_load = "System Load"
|
||||
|
||||
|
||||
--
|
||||
|
@ -136,6 +137,12 @@ stat_dg_title_irq = "%H: Interrupts"
|
|||
stat_dg_label_irq = "Issues/s"
|
||||
stat_ds_irq = "IRQ %di"
|
||||
|
||||
stat_dg_title_load = "%H: System Load"
|
||||
stat_dg_label_load = "Load"
|
||||
stat_ds_load__shortterm = "1 min"
|
||||
stat_ds_load__midterm = "5 min"
|
||||
stat_ds_load__longterm = "15 min"
|
||||
|
||||
|
||||
--
|
||||
-- CBI translations
|
||||
|
@ -300,6 +307,14 @@ lucistatistics_collectdirq_irqs = "Monitor interrupts"
|
|||
lucistatistics_collectdirq_irqs_desc = "multiple separated by space"
|
||||
lucistatistics_collectdirq_ignoreselected = "Monitor all except selected ones"
|
||||
|
||||
-- load plugin
|
||||
lucistatistics_collectdload = "Load Plugin Configuration"
|
||||
lucistatistics_collectdload_desc = [[
|
||||
The load plugin collects statistics about the general system load.
|
||||
]]
|
||||
|
||||
lucistatistics_collectdload_enable = "Enable this plugin"
|
||||
|
||||
-- netlink plugin
|
||||
lucistatistics_collectdnetlink = "Netlink Plugin Configuration"
|
||||
lucistatistics_collectdnetlink_desc = [[
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
--[[
|
||||
|
||||
Luci configuration model for statistics - collectd load 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")
|
||||
|
||||
-- collectd_wireless config section
|
||||
s = m:section( NamedSection, "collectd_load", "luci_statistics" )
|
||||
|
||||
-- collectd_wireless.enable
|
||||
enable = s:option( Flag, "enable" )
|
||||
enable.default = 0
|
||||
|
||||
return m
|
|
@ -0,0 +1,33 @@
|
|||
--[[
|
||||
|
||||
Luci statistics - load plugin diagram definition
|
||||
(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$
|
||||
|
||||
]]--
|
||||
|
||||
module("luci.statistics.rrdtool.definitions.load.load", package.seeall)
|
||||
|
||||
function rrdargs( graph, plugin, plugin_instance, dtype )
|
||||
|
||||
return {
|
||||
data = {
|
||||
sources = {
|
||||
load = { "shortterm", "midterm", "longterm" }
|
||||
},
|
||||
|
||||
options = {
|
||||
load__shortterm = { color = "ff0000" },
|
||||
load__midterm = { color = "ff6600" },
|
||||
load__longterm = { color = "ffaa00" }
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
|
@ -298,6 +298,12 @@ plugins = {
|
|||
{ "Irqs" }
|
||||
},
|
||||
|
||||
load = {
|
||||
{ },
|
||||
{ },
|
||||
{ }
|
||||
},
|
||||
|
||||
logfile = {
|
||||
{ "LogLevel", "File" },
|
||||
{ "Timestamp" },
|
||||
|
|
Loading…
Reference in a new issue