summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/statistics/rrdtool
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-statistics/luasrc/statistics/rrdtool')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/colors.lua77
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua178
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua32
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua27
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua169
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua61
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua27
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua90
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua67
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua75
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua23
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua113
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua45
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua22
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua96
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua43
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua99
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua210
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua130
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua140
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua52
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua70
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua121
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua29
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua30
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua30
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua24
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua30
28 files changed, 0 insertions, 2110 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/colors.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/colors.lua
deleted file mode 100644
index 88b3bbcfe..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/colors.lua
+++ /dev/null
@@ -1,77 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.colors", package.seeall)
-
-local util = require("luci.util")
-
-
-Instance = util.class()
-
-function Instance.from_string( self, s )
- return {
- tonumber(s:sub(1,2), 16),
- tonumber(s:sub(3,4), 16),
- tonumber(s:sub(5,6), 16)
- }
-end
-
-function Instance.to_string( self, c )
- return string.format(
- "%02x%02x%02x",
- math.floor(c[1]),
- math.floor(c[2]),
- math.floor(c[3])
- )
-end
-
-function Instance.defined( self, i )
- local t = {
- {230, 25, 75},
- {245, 130, 48},
- {255, 225, 25},
- {60, 180, 75},
- {70, 240, 240},
- {0, 130, 200},
- {0, 0, 128},
- {170, 110, 40}
- }
- return string.format(
- "%02x%02x%02x",
- t[(i-1) % #t + 1][1], t[(i-1) % #t +1][2], t[(i-1) % #t + 1][3] )
-end
-
-function Instance.random( self )
- local r = math.random(255)
- local g = math.random(255)
- local min = 0
- local max = 255
-
- if ( r + g ) < 255 then
- min = 255 - r - g
- else
- max = 511 - r - g
- end
-
- local b = min + math.floor( math.random() * ( max - min ) )
-
- return { r, g, b }
-end
-
-function Instance.faded( self, fg, opts )
- opts = opts or {}
- opts.background = opts.background or { 255, 255, 255 }
- opts.alpha = opts.alpha or 0.25
-
- if type(opts.background) == "string" then
- opts.background = _string_to_color(opts.background)
- end
-
- local bg = opts.background
-
- return {
- ( opts.alpha * fg[1] ) + ( ( 1.0 - opts.alpha ) * bg[1] ),
- ( opts.alpha * fg[2] ) + ( ( 1.0 - opts.alpha ) * bg[2] ),
- ( opts.alpha * fg[3] ) + ( ( 1.0 - opts.alpha ) * bg[3] )
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
deleted file mode 100644
index 637b5f959..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
+++ /dev/null
@@ -1,178 +0,0 @@
--- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.apcups",package.seeall)
-
-function item()
- return luci.i18n.translate("APC UPS")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
-
- local lu = require("luci.util")
- local rv = { }
-
- -- Types and instances supported by APC UPS
- -- e.g. ups_types -> { 'timeleft', 'charge', 'percent', 'voltage' }
- -- e.g. ups_inst['voltage'] -> { 'input', 'battery' }
-
- local ups_types = graph.tree:data_types( plugin, plugin_instance )
-
- local ups_inst = {}
- for _, t in ipairs(ups_types) do
- ups_inst[t] = graph.tree:data_instances( plugin, plugin_instance, t )
- end
-
- -- Check if hash table or array is empty or nil-filled
-
- local function empty( t )
- for _, v in pairs(t) do
- if type(v) then return false end
- end
- return true
- end
-
-
- -- Append graph definition but only types/instances which are
- -- supported and available to the plugin and UPS.
-
- local function add_supported( t, defs )
- local def_inst = defs['data']['instances']
-
- if type(def_inst) == "table" then
- for k, v in pairs( def_inst ) do
- if lu.contains( ups_types, k) then
- for j = #v, 1, -1 do
- if not lu.contains( ups_inst[k], v[j] ) then
- table.remove( v, j )
- end
- end
- if #v == 0 then
- def_inst[k] = nil -- can't assign v: immutable
- end
- else
- def_inst[k] = nil -- can't assign v: immutable
- end
- end
- if empty(def_inst) then return end
- end
- table.insert( t, defs )
- end
-
-
- -- Graph definitions for APC UPS measurements MUST use only 'instances':
- -- e.g. instances = { voltage = { "input", "output" } }
-
- local voltagesdc = {
- title = "%H: Voltages on APC UPS - Battery",
- vlabel = "Volts DC",
- alt_autoscale = true,
- number_format = "%5.1lfV",
- data = {
- instances = {
- voltage = { "battery" }
- },
- options = {
- voltage = { title = "Battery voltage", noarea=true }
- }
- }
- }
- add_supported( rv, voltagesdc )
-
- local voltagesac = {
- title = "%H: Voltages on APC UPS - AC",
- vlabel = "Volts AC",
- alt_autoscale = true,
- number_format = "%5.1lfV",
- data = {
- instances = {
- voltage = { "input", "output" }
- },
- options = {
- voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
- voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
- }
- }
- }
- add_supported( rv, voltagesac )
-
- local percentload = {
- title = "%H: Load on APC UPS ",
- vlabel = "Percent",
- y_min = "0",
- y_max = "100",
- number_format = "%5.1lf%%",
- data = {
- instances = {
- percent = { "load" }
- },
- options = {
- percent_load = { color = "00ff00", title = "Load level" }
- }
- }
- }
- add_supported( rv, percentload )
-
- local charge_percent = {
- title = "%H: Battery charge on APC UPS ",
- vlabel = "Percent",
- y_min = "0",
- y_max = "100",
- number_format = "%5.1lf%%",
- data = {
- instances = {
- charge = { "" }
- },
- options = {
- charge = { color = "00ff0b", title = "Charge level" }
- }
- }
- }
- add_supported( rv, charge_percent )
-
- local temperature = {
- title = "%H: Battery temperature on APC UPS ",
- vlabel = "\176C",
- number_format = "%5.1lf\176C",
- data = {
- instances = {
- temperature = { "" }
- },
- options = {
- temperature = { color = "ffb000", title = "Battery temperature" } }
- }
- }
- add_supported( rv, temperature )
-
- local timeleft = {
- title = "%H: Time left on APC UPS ",
- vlabel = "Minutes",
- number_format = "%.1lfm",
- data = {
- instances = {
- timeleft = { "" }
- },
- options = {
- timeleft = { color = "0000ff", title = "Time left" }
- }
- }
- }
- add_supported( rv, timeleft )
-
- local frequency = {
- title = "%H: Incoming line frequency on APC UPS ",
- vlabel = "Hz",
- number_format = "%5.0lfhz",
- data = {
- instances = {
- frequency = { "input" }
- },
- options = {
- frequency_input = { color = "000fff", title = "Line frequency" }
- }
- }
- }
- add_supported( rv, frequency )
-
- return rv
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua
deleted file mode 100644
index d99dab0f0..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua
+++ /dev/null
@@ -1,32 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.conntrack",package.seeall)
-
-function item()
- return luci.i18n.translate("Conntrack")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Conntrack entries",
- vlabel = "Count",
- number_format = "%5.0lf",
- data = {
- -- collectd 5.5+: specify "" to exclude "max" instance
- instances = {
- conntrack = { "" }
- },
- sources = {
- conntrack = { "value" }
- },
- options = {
- conntrack = {
- color = "0000ff",
- title = "Tracked connections"
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua
deleted file mode 100644
index f9473e440..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua
+++ /dev/null
@@ -1,27 +0,0 @@
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.contextswitch",package.seeall)
-
-function item()
- return luci.i18n.translate("Context Switches")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Context switches",
- alt_autoscale = true,
- vlabel = "Switches/s",
- number_format = "%5.0lf",
- data = {
- types = { "contextswitch" },
- sources = {
- contextswitch = { "value" }
- },
- options = {
- contextswitch = { color = "0000ff", title = "Context switches", noarea=true, overlay=true }
- }
- }
- }
-end
-
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua
deleted file mode 100644
index 3f8910722..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua
+++ /dev/null
@@ -1,169 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.cpu",package.seeall)
-
-local uci = require("luci.model.uci").cursor()
-local reportbystate = uci:get("luci_statistics", "collectd_cpu", "ReportByState") or "0"
-
-function item()
- return luci.i18n.translate("Processor")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
- local p = {}
-
- local title = "%H: Processor usage"
- if #plugin_instance > 0 then
- title = "%H: Processor usage on core #%pi"
- end
-
- if reportbystate == "1" then
- local cpu = {
- title = title,
- y_min = "0",
- alt_autoscale_max = true,
- vlabel = "Jiffies",
- number_format = "%5.1lf",
- data = {
- instances = {
- cpu = {
- "idle",
- "interrupt",
- "nice",
- "softirq",
- "steal",
- "system",
- "user",
- "wait"
- }
- },
- options = {
- cpu_idle = {
- color = "ffffff",
- title = "Idle"
- },
- cpu_interrupt = {
- color = "a000a0",
- title = "Interrupt"
- },
- cpu_nice = {
- color = "00e000",
- title = "Nice"
- },
- cpu_softirq = {
- color = "ff00ff",
- title = "Softirq"
- },
- cpu_steal = {
- color = "000000",
- title = "Steal"
- },
- cpu_system = {
- color = "ff0000",
- title = "System"
- },
- cpu_user = {
- color = "0000ff",
- title = "User"
- },
- cpu_wait = {
- color = "ffb000",
- title = "Wait"
- }
- }
- }
- }
-
- local percent = {
- title = title,
- y_min = "0",
- alt_autoscale_max = true,
- vlabel = "Percent",
- number_format = "%5.1lf%%",
- data = {
- instances = {
- percent = {
- "idle",
- "interrupt",
- "nice",
- "softirq",
- "steal",
- "system",
- "user",
- "wait"
- }
- },
- options = {
- percent_idle = {
- color = "ffffff",
- title = "Idle"
- },
- percent_interrupt = {
- color = "a000a0",
- title = "Interrupt"
- },
- percent_nice = {
- color = "00e000",
- title = "Nice"
- },
- percent_softirq = {
- color = "ff00ff",
- title = "Softirq"
- },
- percent_steal = {
- color = "000000",
- title = "Steal"
- },
- percent_system = {
- color = "ff0000",
- title = "System"
- },
- percent_user = {
- color = "0000ff",
- title = "User"
- },
- percent_wait = {
- color = "ffb000",
- title = "Wait"
- }
- }
- }
- }
-
- local types = graph.tree:data_types( plugin, plugin_instance )
-
- for _, t in ipairs(types) do
- if t == "cpu" then
- p[#p+1] = cpu
- end
-
- if t == "percent" then
- p[#p+1] = percent
- end
- end
- else
- p = {
- title = title,
- y_min = "0",
- alt_autoscale_max = true,
- vlabel = "Percent",
- number_format = "%5.1lf%%",
- data = {
- instances = {
- percent = {
- "active",
- }
- },
- options = {
- percent_active = {
- color = "00e000",
- title = "Active"
- }
- }
- }
- }
- end
-
- return p
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua
deleted file mode 100644
index cb7ae53af..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua
+++ /dev/null
@@ -1,61 +0,0 @@
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.cpufreq",package.seeall)
-
-local uci = require("luci.model.uci").cursor()
-local extraitems = uci:get("luci_statistics", "collectd_cpufreq", "ExtraItems") or nil
-
-function item()
- return luci.i18n.translate("CPU Frequency")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- local cpufreq = {
- title = "%H: Processor frequency - core %pi",
- alt_autoscale = true,
- vlabel = "Frequency (Hz)",
- number_format = "%3.2lf%s",
- data = {
- types = {"cpufreq" },
- options = {
- cpufreq = { color = "ff0000", title = "Frequency" },
- }
- }
- }
-
- if extraitems then
-
- local transitions = {
- title = "%H: Frequency transitions - core %pi",
- alt_autoscale = true,
- vlabel = "Transitions",
- number_format = "%3.2lf%s",
- data = {
- types = { "transitions" },
- options = {
- transitions = { color = "0000ff", title = "Transitions", noarea=true },
- }
- }
- }
-
- local percentage = {
- title = "%H: Frequency distribution - core %pi",
- alt_autoscale = true,
- vlabel = "Percent",
- number_format = "%5.2lf%%",
- ordercolor = true,
- data = {
- types = { "percent" },
- options = {
- percent = { title = "%di kHz", negweight = true },
- }
- }
- }
-
- return { cpufreq, percentage, transitions }
- else
- return { cpufreq }
- end
-end
-
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua
deleted file mode 100644
index 4fde243ca..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua
+++ /dev/null
@@ -1,27 +0,0 @@
--- Copyright 2018 Chizhong Jin <pjincz@gmail.com>
--- Licensed to the public under the BSD 3-clause license
-
-module("luci.statistics.rrdtool.definitions.curl", package.seeall)
-
-function item()
- return luci.i18n.translate("cUrl")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: cUrl Response Time for #%pi",
- y_min = "0",
- alt_autoscale_max = true,
- vlabel = "Response Time",
- number_format = "%5.1lf%Ss",
- data = {
- types = { "response_time" },
- options = {
- response_time = {
- title = ""
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua
deleted file mode 100644
index fb732991b..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua
+++ /dev/null
@@ -1,90 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.df", package.seeall)
-
-function item()
- return luci.i18n.translate("Disk Space Usage")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- local df_complex = {
- title = "%H: Disk space usage on %pi",
- vlabel = "Bytes",
- number_format = "%5.1lf%sB",
-
- data = {
- instances = {
- df_complex = { "free", "used", "reserved" }
- },
-
- options = {
- df_complex_free = {
- color = "00ff00",
- overlay = false,
- title = "free"
- },
-
- df_complex_used = {
- color = "ff0000",
- overlay = false,
- title = "used"
- },
-
- df_complex_reserved = {
- color = "0000ff",
- overlay = false,
- title = "reserved"
- }
- }
- }
- }
-
- local percent_bytes = {
- title = "%H: Disk space usage on %pi",
- vlabel = "Percent",
- number_format = "%5.2lf %%",
-
- data = {
- instances = {
- percent_bytes = { "free", "used", "reserved" }
- },
-
- options = {
- percent_bytes_free = {
- color = "00ff00",
- overlay = false,
- title = "free"
- },
-
- percent_bytes_used = {
- color = "ff0000",
- overlay = false,
- title = "used"
- },
-
- percent_bytes_reserved = {
- color = "0000ff",
- overlay = false,
- title = "reserved"
- }
- }
- }
- }
-
- local types = graph.tree:data_types( plugin, plugin_instance )
-
- local p = {}
- for _, t in ipairs(types) do
- if t == "percent_bytes" then
- p[#p+1] = percent_bytes
- end
-
- if t == "df_complex" then
- p[#p+1] = df_complex
- end
- end
-
- return p
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
deleted file mode 100644
index 29597ff98..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
+++ /dev/null
@@ -1,67 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.disk", package.seeall)
-
-function item()
- return luci.i18n.translate("Disk Usage")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- {
- title = "%H: Disk I/O operations on %pi",
- vlabel = "Operations/s",
- number_format = "%5.1lf%sOp/s",
-
- data = {
- types = { "disk_ops" },
- sources = {
- disk_ops = { "read", "write" },
- },
-
- options = {
- disk_ops__read = {
- title = "Reads",
- color = "00ff00",
- flip = false
- },
-
- disk_ops__write = {
- title = "Writes",
- color = "ff0000",
- flip = true
- }
- }
- }
- },
-
- {
- title = "%H: Disk I/O bandwidth on %pi",
- vlabel = "Bytes/s",
- number_format = "%5.1lf%sB/s",
-
- detail = true,
-
- data = {
- types = { "disk_octets" },
- sources = {
- disk_octets = { "read", "write" }
- },
- options = {
- disk_octets__read = {
- title = "Read",
- color = "00ff00",
- flip = false
- },
- disk_octets__write = {
- title = "Write",
- color = "ff0000",
- flip = true
- }
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua
deleted file mode 100644
index 0ff4c7685..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua
+++ /dev/null
@@ -1,75 +0,0 @@
--- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.dns", package.seeall)
-
-function item()
- return luci.i18n.translate("DNS")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
-
- local traffic = {
- title = "%H: DNS traffic", vlabel = "Bit/s",
-
- data = {
- sources = {
- dns_octets = { "queries", "responses" }
- },
-
- options = {
- dns_octets__responses = {
- total = true,
- color = "00ff00",
- title = "Responses"
- },
-
- dns_octets__queries = {
- total = true,
- color = "0000ff",
- title = "Queries"
- }
- }
- }
- }
-
- local opcode_query = {
- title = "%H: DNS Opcode Query", vlabel = "Queries/s",
- data = {
- instances = { dns_opcode = { "Query" } },
- options = {
- dns_opcode_Query_value = {
- total = true,
- color = "0000ff",
- title = "Queries/s"
- },
- }
- }
- }
-
- local qtype = {
- title = "%H: DNS QType", vlabel = "Queries/s",
- data = {
- sources = { dns_qtype = { "" } },
- options = {
- dns_qtype_AAAA_ = { title = "AAAA", noarea = true, total = true },
- dns_qtype_A_ = { title = "A", noarea = true, total = true },
- dns_qtype_A6_ = { title = "A6", noarea = true, total = true },
- dns_qtype_TXT_ = { title = "TXT", noarea = true, total = true },
- dns_qtype_MX_ = { title = "MX", noarea = true, total = true },
- dns_qtype_NS_ = { title = "NS", noarea = true, total = true },
- dns_qtype_ANY_ = { title = "ANY", noarea = true, total = true },
- dns_qtype_CNAME_= { title = "CNAME", noarea = true, total = true },
- dns_qtype_SOA_ = { title = "SOA", noarea = true, total = true },
- dns_qtype_SRV_ = { title = "SRV", noarea = true, total = true },
- dns_qtype_PTR_ = { title = "PTR", noarea = true, total = true },
- dns_qtype_RP_ = { title = "RP", noarea = true, total = true },
- dns_qtype_MAILB_= { title = "MAILB", noarea = true, total = true },
- dns_qtype_IXFR_ = { title = "IXFR", noarea = true, total = true },
- dns_qtype_HINFO_= { title = "HINFO", noarea = true, total = true },
- },
- }
- }
-
- return { traffic, opcode_query, qtype }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua
deleted file mode 100644
index 01eb33f9b..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua
+++ /dev/null
@@ -1,23 +0,0 @@
--- Copyright 2015 Hannu Nyman <hannu.nyman@iki.fi>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.entropy", package.seeall)
-
-function item()
- return luci.i18n.translate("Entropy")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Available entropy",
- vlabel = "bits",
- number_format = "%4.0lf",
- data = {
- types = { "entropy" },
- options = { entropy = { title = "Entropy %di" } }
- }
- }
-
-end
-
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
deleted file mode 100644
index a4d4eefd5..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
+++ /dev/null
@@ -1,113 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.interface", package.seeall)
-
-function item()
- return luci.i18n.translate("Interfaces")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
-
- --
- -- traffic diagram
- --
- local traffic = {
-
- -- draw this diagram for each plugin instance
- per_instance = true,
- title = "%H: Transfer on %pi",
- vlabel = "Bytes/s",
-
- -- diagram data description
- data = {
- -- defined sources for data types, if omitted assume a single DS named "value" (optional)
- sources = {
- if_octets = { "tx", "rx" }
- },
-
- -- special options for single data lines
- options = {
- if_octets__tx = {
- total = true, -- report total amount of bytes
- color = "00ff00", -- tx is green
- title = "Bytes (TX)"
- },
-
- if_octets__rx = {
- flip = true, -- flip rx line
- total = true, -- report total amount of bytes
- color = "0000ff", -- rx is blue
- title = "Bytes (RX)"
- }
- }
- }
- }
-
-
- --
- -- packet diagram
- --
- local packets = {
-
- -- draw this diagram for each plugin instance
- per_instance = true,
- title = "%H: Packets on %pi",
- vlabel = "Packets/s",
-
- -- diagram data description
- data = {
- -- data type order
- types = { "if_packets", "if_errors" },
-
- -- defined sources for data types
- sources = {
- if_packets = { "tx", "rx" },
- if_errors = { "tx", "rx" }
- },
-
- -- special options for single data lines
- options = {
- -- processed packets (tx DS)
- if_packets__tx = {
- weight = 1,
- overlay = true, -- don't summarize
- total = true, -- report total amount of bytes
- color = "00ff00", -- processed tx is green
- title = "Processed (TX)"
- },
-
- -- processed packets (rx DS)
- if_packets__rx = {
- weight = 2,
- overlay = true, -- don't summarize
- flip = true, -- flip rx line
- total = true, -- report total amount of bytes
- color = "0000ff", -- processed rx is blue
- title = "Processed (RX)"
- },
-
- -- packet errors (tx DS)
- if_errors__tx = {
- weight = 0,
- overlay = true, -- don't summarize
- total = true, -- report total amount of packets
- color = "ff5500", -- tx errors are orange
- title = "Errors (TX)"
- },
-
- -- packet errors (rx DS)
- if_errors__rx = {
- weight = 3,
- overlay = true, -- don't summarize
- flip = true, -- flip rx line
- total = true, -- report total amount of packets
- color = "ff0000", -- rx errors are red
- title = "Errors (RX)"
- }
- }
- }
- }
-
- return { traffic, packets }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua
deleted file mode 100644
index 68a4ecf62..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua
+++ /dev/null
@@ -1,45 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.iptables", package.seeall)
-
-function item()
- return luci.i18n.translate("Firewall")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- {
- title = "%H: Firewall: Processed bytes in %pi",
- vlabel = "Bytes/s",
- number_format = "%5.1lf%sB/s",
- totals_format = "%5.1lf%sB",
- data = {
- types = { "ipt_bytes" },
- options = {
- ipt_bytes = {
- total = true,
- title = "%di"
- }
- }
- }
- },
-
- {
- title = "%H: Firewall: Processed packets in %pi",
- vlabel = "Packets/s",
- number_format = "%5.1lf P/s",
- totals_format = "%5.1lf%s",
- data = {
- types = { "ipt_packets" },
- options = {
- ipt_packets = {
- total = true,
- title = "%di"
- }
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua
deleted file mode 100644
index 56b4547b9..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua
+++ /dev/null
@@ -1,22 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.irq", package.seeall)
-
-function item()
- return luci.i18n.translate("Interrupts")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Interrupts", vlabel = "Issues/s",
- number_format = "%5.0lf", data = {
- types = { "irq" },
- options = {
- irq = { title = "IRQ %di", noarea = true }
- }
- }
- }
-
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua
deleted file mode 100644
index 53f4c7a40..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua
+++ /dev/null
@@ -1,96 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.iwinfo", package.seeall)
-
-function item()
- return luci.i18n.translate("Wireless")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
-
- --
- -- signal/noise diagram
- --
- local snr = {
- title = "%H: Signal and noise on %pi",
- vlabel = "dBm",
- number_format = "%5.1lf dBm",
- data = {
- types = { "signal_noise", "signal_power" },
- options = {
- signal_power = {
- title = "Signal",
- overlay = true,
- color = "0000ff"
- },
- signal_noise = {
- title = "Noise",
- overlay = true,
- color = "ff0000"
- }
- }
- }
- }
-
-
- --
- -- signal quality diagram
- --
- local quality = {
- title = "%H: Signal quality on %pi",
- vlabel = "Quality",
- number_format = "%3.0lf",
- data = {
- types = { "signal_quality" },
- options = {
- signal_quality = {
- title = "Quality",
- noarea = true,
- color = "0000ff"
- }
- }
- }
- }
-
-
- --
- -- phy rate diagram
- --
- local bitrate = {
- title = "%H: Average phy rate on %pi",
- vlabel = "MBit/s",
- number_format = "%5.1lf%sBit/s",
- data = {
- types = { "bitrate" },
- options = {
- bitrate = {
- title = "Rate",
- color = "00ff00"
- }
- }
- }
- }
-
- --
- -- associated stations
- --
- local stations = {
- title = "%H: Associated stations on %pi",
- vlabel = "Stations",
- y_min = "0",
- alt_autoscale_max = true,
- number_format = "%3.0lf",
- data = {
- types = { "stations" },
- options = {
- stations = {
- title = "Stations",
- color = "0000ff"
- }
- }
- }
- }
-
- return { snr, quality, bitrate, stations }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua
deleted file mode 100644
index 2caf6a0b1..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua
+++ /dev/null
@@ -1,43 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.load", package.seeall)
-
-function item()
- return luci.i18n.translate("System Load")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Load", vlabel = "Load",
- y_min = "0",
- units_exponent = "0",
- number_format = "%5.2lf", data = {
- sources = {
- load = { "shortterm", "midterm", "longterm" }
- },
-
- options = {
- load__shortterm = {
- color = "ff0000",
- title = "1 minute",
- noarea = true,
- weight = 3
- },
- load__midterm = {
- color = "ff6600",
- title = "5 minutes",
- overlay = true,
- weight = 1
- },
- load__longterm = {
- color = "ffaa00",
- title = "15 minutes",
- overlay = true,
- weight = 2
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua
deleted file mode 100644
index 749c3e352..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua
+++ /dev/null
@@ -1,99 +0,0 @@
--- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.memory",package.seeall)
-
-function item()
- return luci.i18n.translate("Memory")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
- local p = {}
-
- local memory = {
- title = "%H: Memory usage",
- vlabel = "MB",
- number_format = "%5.1lf%s",
- y_min = "0",
- alt_autoscale_max = true,
- data = {
- instances = {
- memory = {
- "free",
- "buffered",
- "cached",
- "used"
- }
- },
-
- options = {
- memory_buffered = {
- color = "0000ff",
- title = "Buffered"
- },
- memory_cached = {
- color = "ff00ff",
- title = "Cached"
- },
- memory_used = {
- color = "ff0000",
- title = "Used"
- },
- memory_free = {
- color = "00ff00",
- title = "Free"
- }
- }
- }
- }
-
- local percent = {
- title = "%H: Memory usage",
- vlabel = "Percent",
- number_format = "%5.1lf%%",
- y_min = "0",
- alt_autoscale_max = true,
- data = {
- instances = {
- percent = {
- "free",
- "buffered",
- "cached",
- "used"
- }
- },
- options = {
- percent_buffered = {
- color = "0000ff",
- title = "Buffered"
- },
- percent_cached = {
- color = "ff00ff",
- title = "Cached"
- },
- percent_used = {
- color = "ff0000",
- title = "Used"
- },
- percent_free = {
- color = "00ff00",
- title = "Free"
- }
- }
- }
- }
-
- local types = graph.tree:data_types( plugin, plugin_instance )
-
- for _, t in ipairs(types) do
- if t == "percent" then
- p[#p+1] = percent
- end
-
- if t == "memory" then
- p[#p+1] = memory
- end
- end
-
- return p
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
deleted file mode 100644
index bdd3f2eb4..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
+++ /dev/null
@@ -1,210 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.netlink", package.seeall)
-
-function item()
- return luci.i18n.translate("Netlink")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
-
- --
- -- traffic diagram
- --
- local traffic = {
- title = "%H: Netlink - Transfer on %pi",
- vlabel = "Bytes/s",
-
- -- diagram data description
- data = {
- -- defined sources for data types, if omitted assume a single DS named "value" (optional)
- sources = {
- if_octets = { "tx", "rx" }
- },
-
- -- special options for single data lines
- options = {
- if_octets__tx = {
- title = "Bytes (TX)",
- total = true, -- report total amount of bytes
- color = "00ff00" -- tx is green
- },
-
- if_octets__rx = {
- title = "Bytes (RX)",
- flip = true, -- flip rx line
- total = true, -- report total amount of bytes
- color = "0000ff" -- rx is blue
- }
- }
- }
- }
-
- --
- -- packet diagram
- --
- local packets = {
- title = "%H: Netlink - Packets on %pi",
- vlabel = "Packets/s", detail = true,
-
- -- diagram data description
- data = {
- -- data type order
- types = { "if_packets", "if_dropped", "if_errors" },
-
- -- defined sources for data types
- sources = {
- if_packets = { "tx", "rx" },
- if_dropped = { "tx", "rx" },
- if_errors = { "tx", "rx" }
- },
-
- -- special options for single data lines
- options = {
- -- processed packets (tx DS)
- if_packets__tx = {
- weight = 2,
- title = "Total (TX)",
- overlay = true, -- don't summarize
- total = true, -- report total amount of bytes
- color = "00ff00" -- processed tx is green
- },
-
- -- processed packets (rx DS)
- if_packets__rx = {
- weight = 3,
- title = "Total (RX)",
- overlay = true, -- don't summarize
- flip = true, -- flip rx line
- total = true, -- report total amount of bytes
- color = "0000ff" -- processed rx is blue
- },
-
- -- dropped packets (tx DS)
- if_dropped__tx = {
- weight = 1,
- title = "Dropped (TX)",
- overlay = true, -- don't summarize
- total = true, -- report total amount of bytes
- color = "660055" -- dropped tx is ... dunno ;)
- },
-
- -- dropped packets (rx DS)
- if_dropped__rx = {
- weight = 4,
- title = "Dropped (RX)",
- overlay = true, -- don't summarize
- flip = true, -- flip rx line
- total = true, -- report total amount of bytes
- color = "ff00ff" -- dropped rx is violett
- },
-
- -- packet errors (tx DS)
- if_errors__tx = {
- weight = 0,
- title = "Errors (TX)",
- overlay = true, -- don't summarize
- total = true, -- report total amount of packets
- color = "ff5500" -- tx errors are orange
- },
-
- -- packet errors (rx DS)
- if_errors__rx = {
- weight = 5,
- title = "Errors (RX)",
- overlay = true, -- don't summarize
- flip = true, -- flip rx line
- total = true, -- report total amount of packets
- color = "ff0000" -- rx errors are red
- }
- }
- }
- }
-
- --
- -- multicast diagram
- --
- local multicast = {
- title = "%H: Netlink - Multicast on %pi",
- vlabel = "Packets/s", detail = true,
-
- -- diagram data description
- data = {
- -- data type order
- types = { "if_multicast" },
-
- -- special options for single data lines
- options = {
- -- multicast packets
- if_multicast = {
- title = "Packets",
- total = true, -- report total amount of packets
- color = "0000ff" -- multicast is blue
- }
- }
- }
- }
-
- --
- -- collision diagram
- --
- local collisions = {
- title = "%H: Netlink - Collisions on %pi",
- vlabel = "Collisions/s", detail = true,
-
- -- diagram data description
- data = {
- -- data type order
- types = { "if_collisions" },
-
- -- special options for single data lines
- options = {
- -- collision rate
- if_collisions = {
- title = "Collisions",
- total = true, -- report total amount of packets
- color = "ff0000" -- collsions are red
- }
- }
- }
- }
-
- --
- -- error diagram
- --
- local errors = {
- title = "%H: Netlink - Errors on %pi",
- vlabel = "Errors/s", detail = true,
-
- -- diagram data description
- data = {
- -- data type order
- types = { "if_tx_errors", "if_rx_errors" },
-
- -- data type instances
- instances = {
- if_tx_errors = { "aborted", "carrier", "fifo", "heartbeat", "window" },
- if_rx_errors = { "length", "missed", "over", "crc", "fifo", "frame" }
- },
-
- -- special options for single data lines
- options = {
- if_tx_errors_aborted_value = { total = true, color = "ffff00", title = "Aborted (TX)" },
- if_tx_errors_carrier_value = { total = true, color = "ffcc00", title = "Carrier (TX)" },
- if_tx_errors_fifo_value = { total = true, color = "ff9900", title = "Fifo (TX)" },
- if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" },
- if_tx_errors_window_value = { total = true, color = "ff3300", title = "Window (TX)" },
-
- if_rx_errors_length_value = { flip = true, total = true, color = "ff0000", title = "Length (RX)" },
- if_rx_errors_missed_value = { flip = true, total = true, color = "ff0033", title = "Missed (RX)" },
- if_rx_errors_over_value = { flip = true, total = true, color = "ff0066", title = "Over (RX)" },
- if_rx_errors_crc_value = { flip = true, total = true, color = "ff0099", title = "CRC (RX)" },
- if_rx_errors_fifo_value = { flip = true, total = true, color = "ff00cc", title = "Fifo (RX)" },
- if_rx_errors_frame_value = { flip = true, total = true, color = "ff00ff", title = "Frame (RX)" }
- }
- }
- }
-
- return { traffic, packets, multicast, collisions, errors }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
deleted file mode 100644
index df6da3580..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
+++ /dev/null
@@ -1,130 +0,0 @@
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.nut",package.seeall)
-
-function item()
- return luci.i18n.translate("UPS")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- local voltages_ac = {
- title = "%H: AC voltages on UPS \"%pi\"",
- vlabel = "V",
- number_format = "%5.1lfV",
- data = {
- instances = {
- voltage = { "input", "output" }
- },
- options = {
- voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
- voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
- }
- }
- }
-
- local voltages_dc = {
- title = "%H: Battery voltage on UPS \"%pi\"",
- vlabel = "V",
- number_format = "%5.1lfV",
- data = {
- instances = {
- voltage = { "battery" }
- },
- options = {
- voltage = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true }
- }
- }
- }
-
- local currents = {
- title = "%H: Current on UPS \"%pi\"",
- vlabel = "A",
- number_format = "%5.3lfA",
- data = {
- instances = {
- current = { "battery", "output" }
- },
- options = {
- current_output = { color = "00e000", title = "Output current", noarea=true, overlay=true },
- current_battery = { color = "0000ff", title = "Battery current", noarea=true, overlay=true }
- }
- }
- }
-
- local percentage = {
- title = "%H: Battery charge/load on UPS \"%pi\"",
- vlabel = "Percent",
- y_min = "0",
- y_max = "100",
- number_format = "%5.1lf%%",
- data = {
- instances = {
- percent = { "charge", "load" }
- },
- options = {
- percent_charge = { color = "00ff00", title = "Charge level", noarea=true, overlay=true },
- percent_load = { color = "ff0000", title = "Load", noarea=true, overlay=true }
- }
- }
- }
-
- -- Note: This is in ISO8859-1 for rrdtool. Welcome to the 20th century.
- local temperature = {
- title = "%H: Battery temperature on UPS \"%pi\"",
- vlabel = "\176C",
- number_format = "%5.1lf\176C",
- data = {
- instances = {
- temperature = "battery"
- },
- options = {
- temperature_battery = { color = "ffb000", title = "Battery temperature", noarea=true }
- }
- }
- }
-
- local timeleft = {
- title = "%H: Time left on UPS \"%pi\"",
- vlabel = "Minutes",
- number_format = "%.1lfm",
- data = {
- instances = {
- timeleft = { "battery" }
- },
- options = {
- timeleft_battery = { color = "0000ff", title = "Time left", transform_rpn = "60,/", noarea=true }
- }
- }
- }
-
- local power = {
- title = "%H: Power on UPS \"%pi\"",
- vlabel = "Power",
- number_format = "%5.1lf%%",
- data = {
- instances = {
- power = { "ups" }
- },
- options = {
- power_ups = { color = "00ff00", title = "Power level" }
- }
- }
- }
-
- local frequencies = {
- title = "%H: Frequencies on UPS \"%pi\"",
- vlabel = "Hz",
- number_format = "%5.1lfHz",
- data = {
- instances = {
- frequency = { "input", "output" }
- },
- options = {
- frequency_output = { color = "00e000", title = "Output frequency", noarea=true, overlay=true },
- frequency_input = { color = "ffb000", title = "Input frequency", noarea=true, overlay=true }
- }
- }
- }
- return { voltages_ac, voltages_dc, currents, percentage, temperature, timeleft, power, frequencies }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua
deleted file mode 100644
index 52bfbdf4f..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua
+++ /dev/null
@@ -1,140 +0,0 @@
--- Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.olsrd", package.seeall)
-
-function item()
- return luci.i18n.translate("OLSRd")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
- local g = { }
-
- if plugin_instance == "routes" then
-
- g[#g+1] = {
- -- diagram data description
- title = "%H: Total amount of OLSR routes", vlabel = "n",
- number_format = "%5.0lf", data = {
- types = { "routes" },
- options = {
- routes = {
- color = "ff0000",
- title = "Total number of routes"
- }
- }
- }
- }
-
- g[#g+1] = {
- title = "%H: Average route ETX", vlabel = "ETX", detail = true,
- number_format = "%5.1lf",data = {
- instances = { "average" }, -- falls es irgendwann mal welche pro ip gibt, wie bei links, dann werden die hier excludiert
- types = { "route_etx" },
- options = {
- route_etx = {
- title = "Average route ETX"
- }
- }
- }
- }
-
- g[#g+1] = {
- title = "%H: Average route metric", vlabel = "metric", detail = true,
- number_format = "%5.1lf", data = {
- instances = { "average" }, -- falls es irgendwann mal welche pro ip gibt, wie bei links, dann werden die hier excludiert
- types = { "route_metric" },
- options = {
- route_metric = {
- title = "Average route metric"
- }
- }
- }
- }
-
- elseif plugin_instance == "links" then
-
- g[#g+1] = {
- -- diagram data description
- title = "%H: Total amount of OLSR neighbours", vlabel = "n",
- number_format = "%5.0lf", data = {
- instances = { "" },
- types = { "links" },
- options = {
- links = {
- color = "00ff00",
- title = "Number of neighbours"
- }
- }
- }
- }
-
- local instances = graph.tree:data_instances(plugin, plugin_instance, "signal_quality")
- table.sort(instances)
-
- -- define one diagram per host, containing the rx and lq values
- local i
- for i = 1, #instances, 2 do
- local dsn1 = "signal_quality_%s_value" % instances[i]:gsub("[^%w]+", "_")
- local dsn2 = "signal_quality_%s_value" % instances[i+1]:gsub("[^%w]+", "_")
- local host = instances[i]:match("^[^%-]+%-([^%-]+)%-.+")
-
- g[#g+1] = {
- title = "%H: Signal Quality" .. " (" .. (host or "avg") ..")", vlabel = "ETX",
- number_format = "%5.2lf", detail = true,
- data = {
- types = { "signal_quality" },
-
- instances = {
- signal_quality = { instances[i], instances[i+1] },
- },
-
- options = {
- [dsn1] = {
- color = "00ff00",
- title = "LQ (%s)" % (host or "avg"),
- },
- [dsn2] = {
- color = "0000ff",
- title = "NLQ (%s)" % (host or "avg"),
- flip = true
- }
- }
- }
- }
- end
-
- elseif plugin_instance == "topology" then
-
- g[#g+1] = {
- title= "%H: Total amount of OLSR links", vlabel = "n",
- number_format = "%5.0lf", data = {
- instances = { "" },
- types = { "links" },
- options = {
- links = {
- color = "0000ff",
- title = "Total number of links"
- }
- }
- }
- }
-
- g[#g+1] = {
- title= "%H: Average signal quality", vlabel = "n",
- number_format = "%5.2lf", detail = true,
- data = {
- instances = { "average" }, -- exclude possible per-ip stuff
- types = { "signal_quality" },
- options = {
- signal_quality = {
- color = "0000ff",
- title = "Average signal quality"
- }
- }
- }
- }
- end
-
- return g
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua
deleted file mode 100644
index d16dbac90..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua
+++ /dev/null
@@ -1,52 +0,0 @@
--- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.openvpn", package.seeall)
-
-function item()
- return luci.i18n.translate("OpenVPN")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
- local inst = plugin_instance:gsub("^openvpn%.(.+)%.status$", "%1")
-
- return {
- {
- title = "%%H: OpenVPN \"%s\" - Traffic" % inst,
- vlabel = "Bytes/s",
- data = {
- instances = {
- if_octets = { "traffic", "overhead" }
- },
- sources = {
- if_octets = { "tx", "rx" }
- },
- options = {
- if_octets_traffic_tx = { weight = 0, title = "Bytes (TX)", total = true, color = "00ff00" },
- if_octets_overhead_tx = { weight = 1, title = "Overhead (TX)", total = true, color = "ff9900" },
- if_octets_overhead_rx = { weight = 2, title = "Overhead (RX)", total = true, flip = true, color = "ff00ff" },
- if_octets_traffic_rx = { weight = 3, title = "Bytes (RX)", total = true, flip = true, color = "0000ff" }
- }
- }
- },
-
- {
- title = "%%H: OpenVPN \"%s\" - Compression" % inst,
- vlabel = "Bytes/s",
- data = {
- instances = {
- compression = { "data_out", "data_in" }
- },
- sources = {
- compression = { "uncompressed", "compressed" }
- },
- options = {
- compression_data_out_uncompressed = { weight = 0, title = "Uncompressed (TX)", total = true, color = "00ff00" },
- compression_data_out_compressed = { weight = 1, title = "Compressed (TX)", total = true, color = "008800" },
- compression_data_in_compressed = { weight = 2, title = "Compressed (RX)", total = true, flip = true, color = "000088" },
- compression_data_in_uncompressed = { weight = 3, title = "Uncompressed (RX)", total = true, flip = true, color = "0000ff" }
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
deleted file mode 100644
index b8d11c075..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
+++ /dev/null
@@ -1,70 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.ping", package.seeall)
-
-function item()
- return luci.i18n.translate("Ping")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- local ping = {
- title = "%H: ICMP Round Trip Time",
- vlabel = "ms",
- number_format = "%5.1lf ms",
- data = {
- sources = {
- ping = {
- "value"
- }
- },
- options = {
- ping__value = {
- noarea = true,
- overlay = true,
- title = "%di"
- }
- }
- }
- }
-
- local droprate = {
- title = "%H: ICMP Drop Rate",
- vlabel = "%",
- number_format = "%5.2lf %%",
- data = {
- types = {
- "ping_droprate"
- },
- options = {
- ping_droprate = {
- noarea = true,
- overlay = true,
- title = "%di",
- transform_rpn = "100,*"
- }
- }
- }
- }
-
- local stddev = {
- title = "%H: ICMP Standard Deviation",
- vlabel = "ms",
- number_format = "%5.1lf ms",
- data = {
- types = {
- "ping_stddev"
- },
- options = {
- ping_stddev = {
- noarea = true,
- overlay = true,
- title = "%di"
- }
- }
- }
- }
-
- return { ping, droprate, stddev }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua
deleted file mode 100644
index 4303824f3..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua
+++ /dev/null
@@ -1,121 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.processes", package.seeall)
-
-function item()
- return luci.i18n.translate("Processes")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- if plugin_instance == "" then
- return {
- title = "%H: Processes",
- vlabel = "Processes/s",
- data = {
- instances = {
- ps_state = {
- "sleeping", "running", "paging",
- "blocked", "stopped", "zombies"
- }
- },
-
- options = {
- ps_state_sleeping = { color = "0000ff", title = "Sleeping" },
- ps_state_running = { color = "008000", title = "Running" },
- ps_state_paging = { color = "ffff00", title = "Paging" },
- ps_state_blocked = { color = "ff5000", title = "Blocked" },
- ps_state_stopped = { color = "555555", title = "Stopped" },
- ps_state_zombies = { color = "ff0000", title = "Zombies" }
- }
- }
- }
- else
- return {
- {
- title = "%H: CPU time used by %pi",
- vlabel = "Jiffies",
- data = {
- sources = {
- ps_cputime = { "syst", "user" }
- },
-
- options = {
- ps_cputime__user = {
- color = "0000ff",
- title = "User",
- overlay = true
- },
-
- ps_cputime__syst = {
- color = "ff0000",
- title = "System",
- overlay = true
- }
- }
- }
- },
-
- {
- title = "%H: Threads and processes belonging to %pi",
- vlabel = "Count",
- detail = true,
- data = {
- sources = {
- ps_count = { "threads", "processes" }
- },
-
- options = {
- ps_count__threads = { color = "00ff00", title = "Threads" },
- ps_count__processes = { color = "0000bb", title = "Processes" }
- }
- }
- },
-
- {
- title = "%H: Page faults in %pi",
- vlabel = "Page faults",
- detail = true,
- data = {
- sources = {
- ps_pagefaults = { "minflt", "majflt" }
- },
-
- options = {
- ps_pagefaults__minflt = { color = "0000ff", title = "Minor" },
- ps_pagefaults__majflt = { color = "ff0000", title = "Major" }
- }
- }
- },
-
- {
- title = "%H: Resident segment size (RSS) of %pi",
- vlabel = "Bytes",
- detail = true,
- number_format = "%5.1lf%sB",
- data = {
- types = { "ps_rss" },
-
- options = {
- ps_rss = { color = "0000ff", title = "Resident segment" }
- }
- }
- },
-
- {
- title = "%H: Virtual memory size (VSZ) of %pi",
- vlabel = "Bytes",
- detail = true,
- number_format = "%5.1lf%sB",
- data = {
- types = { "ps_vm" },
-
- options = {
- ps_vm = { color = "0000ff", title = "Virtual memory" }
- }
- }
- }
- }
- end
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua
deleted file mode 100644
index 6e09a7b9f..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua
+++ /dev/null
@@ -1,29 +0,0 @@
--- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.sensors", package.seeall)
-
-function item()
- return luci.i18n.translate("Sensors")
-end
-
-function rrdargs( graph, plugin, plugin_instance )
-
- return {
- {
- per_instance = true,
- title = "%H: %pi - %di",
- vlabel = "\176C",
- number_format = "%4.1lf\176C",
- data = {
- types = { "temperature" },
- options = {
- temperature__value = {
- color = "ff0000",
- title = "Temperature"
- }
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua
deleted file mode 100644
index 5af998cfb..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua
+++ /dev/null
@@ -1,30 +0,0 @@
--- Copyright 2013 Freifunk Augsburg / Michael Wendland <michael@michiwend.com>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.splash_leases", package.seeall)
-
-function item()
- return luci.i18n.translate("Splash Leases")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Splash Leases",
- vlabel = "Active Clients",
- y_min = "0",
- number_format = "%5.1lf",
- data = {
- sources = {
- splash_leases = { "leased", "whitelisted", "blacklisted" }
- },
-
- options = {
- splash_leases__leased = { color = "00CC00", title = "Leased", overlay = false },
- splash_leases__whitelisted = { color = "0000FF", title = "Whitelisted", overlay = false },
- splash_leases__blacklisted = { color = "FF0000", title = "Blacklisted", overlay = false }
- }
- }
- }
-
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua
deleted file mode 100644
index 2d762f7a4..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua
+++ /dev/null
@@ -1,30 +0,0 @@
--- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.tcpconns", package.seeall)
-
-function item()
- return luci.i18n.translate("TCP Connections")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: TCP connections to port %pi",
- vlabel = "Connections/s",
- number_format = "%5.0lf",
- data = {
- types = { "tcp_connections" },
- instances = {
- tcp_connections = {
- "SYN_SENT", "SYN_RECV", "LISTEN", "ESTABLISHED",
- "LAST_ACK", "TIME_WAIT", "CLOSING", "CLOSE_WAIT",
- "CLOSED", "FIN_WAIT1", "FIN_WAIT2"
- },
- options = {
- load__ESTABLISHED = { title = "%di", noarea = true }
- }
- }
- }
- }
-end
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua
deleted file mode 100644
index 4a555a605..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua
+++ /dev/null
@@ -1,24 +0,0 @@
--- Licensed to the public under the Apache License 2.0.
-
-module("luci.statistics.rrdtool.definitions.thermal",package.seeall)
-
-function item()
- return luci.i18n.translate("Thermal")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Temperature of %pi",
- alt_autoscale = true,
- vlabel = "Celsius",
- number_format = "%3.1lf%s",
- data = {
- types = { "temperature" },
- options = {
- temperature = { color = "ff0000", title = "Temperature", noarea=true },
- }
- }
- }
-end
-
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua
deleted file mode 100644
index 8d7d42bc6..000000000
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua
+++ /dev/null
@@ -1,30 +0,0 @@
---[[
-
-Copyright 2013 Thomas Endt <tmo26@gmx.de>
-
-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
-]]--
-
-module("luci.statistics.rrdtool.definitions.uptime", package.seeall)
-
-function item()
- return luci.i18n.translate("Uptime")
-end
-
-function rrdargs( graph, plugin, plugin_instance, dtype )
-
- return {
- title = "%H: Uptime", vlabel = "seconds",
- number_format = "%5.0lf%s", data = {
- types = { "uptime" },
- options = {
- uptime = { title = "Uptime %di", noarea = true }
- }
- }
- }
-end
-