summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/src/statistics/rrdtool/definitions
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-statistics/src/statistics/rrdtool/definitions')
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/cpu/cpu.lua31
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/iptables/ipt_packets.lua26
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/netlink.lua163
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/ping/ping.lua23
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/processes/ps_state.lua31
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua27
-rw-r--r--applications/luci-statistics/src/statistics/rrdtool/definitions/wireless.lua25
7 files changed, 0 insertions, 326 deletions
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/cpu/cpu.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/cpu/cpu.lua
deleted file mode 100644
index 2626d276d1..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/cpu/cpu.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-module("luci.statistics.rrdtool.definitions.cpu.cpu",package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance, dtype )
-
- dtype_instances = { "idle", "nice", "system", "user" }
-
- opts = { }
- opts.sources = { }
- opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype )
- opts.title = host .. ": Prozessorauslastung"
- opts.rrd = { "-v", "Percent" }
- opts.colors = {
- idle = 'ffffff',
- nice = '00e000',
- user = '0000ff',
- wait = 'ffb000',
- system = 'ff0000',
- softirq = 'ff00ff',
- interrupt = 'a000a0',
- steal = '000000'
- }
-
- for i, inst in ipairs(dtype_instances) do
- opts.sources[i] = {
- name = inst,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
- }
- end
-
- return opts
-end
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/iptables/ipt_packets.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/iptables/ipt_packets.lua
deleted file mode 100644
index b16add995d..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/iptables/ipt_packets.lua
+++ /dev/null
@@ -1,26 +0,0 @@
-module("luci.statistics.rrdtool.definitions.iptables.ipt_packets", package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance, dtype )
-
- dtype_instances = graph.tree:data_instances( plugin, plugin_instance, dtype )
- opts = { }
-
- for i, inst in ipairs(dtype_instances) do
-
- opts[i] = { }
- opts[i].image = graph:mkpngpath( host, plugin, plugin_instance, dtype, inst )
- opts[i].title = host .. ": Firewall - " .. inst:gsub("_"," ")
- opts[i].rrd = { "-v", "Pakete/s" }
-
- opts[i].colors = {
-
- }
-
- opts[i].sources = { {
- name = inst,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
- } }
- end
-
- return opts
-end
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/netlink.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/netlink.lua
deleted file mode 100644
index 3cee6abc00..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/netlink.lua
+++ /dev/null
@@ -1,163 +0,0 @@
-module("luci.statistics.rrdtool.definitions.netlink", package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance )
-
- local diagram_list = { }
-
- -- diagram names
- local dtypes_names = {
- "Pakete",
- "Paketkollisionen",
- "Paketfehler",
- "Verkehr",
- "RX-Fehler",
- "TX-Fehler"
- }
-
- -- diagram units
- local dtypes_units = {
- "Pakete/s",
- "Kollisionen/s",
- "Fehler/s", -- (?)
- "Bytes/s",
- "Fehler/s",
- "Fehler/s"
- }
-
- -- data source overrides
- local dtypes_sources = {
- if_errors = { "rx", "tx" }, -- if_errors has rx and tx
- if_octets = { "rx", "tx" } -- if_octets has rx and tx
- }
-
- -- diagram data types
- local dtypes_list = {
-
- -- diagram 1: combined interface packet statistics
- {
- if_dropped = { "" }, -- packets/s
- if_multicast = { "" }, -- packets/s
- if_packets = { "" } -- packets/s
- },
-
- -- diagram 2: interface collision statistics
- {
- if_collisions = { "" } -- collisions/s
- },
-
- -- diagram 3: interface error statistics
- {
- if_errors = { "" } -- errors/s (?)
- },
-
- -- diagram 4: interface traffic statistics
- {
- if_octets = { "" } -- bytes/s
- },
-
- -- diagram 5: interface rx error statistics
- {
- if_rx_errors = { -- errors/s
- "length", "missed", "over", "crc", "fifo", "frame"
- }
- },
-
- -- diagram 6: interface tx error statistics
- {
- if_tx_errors = { -- errors/s
- "aborted", "carrier", "fifo", "heartbeat", "window"
- }
- }
- }
-
- -- diagram colors
- local dtypes_colors = {
-
- -- diagram 1
- {
- if_dropped = "ff0000",
- if_multicast = "0000ff",
- if_packets = "00ff00"
- },
-
- -- diagram 2
- {
- if_collisions = "ff0000"
- },
-
- -- diagram 3
- {
- if_errors__tx_ = "ff0000",
- if_errors__rx_ = "ff5500"
- },
-
- -- diagram 4
- {
- if_octets__tx_ = "00ff00",
- if_octets__rx_ = "0000ff"
- },
-
- -- diagram 5
- {
- length = "0000ff",
- missed = "ff5500",
- over = "ff0066",
- crc = "ff0000",
- fifo = "00ff00",
- frame = "ffff00"
- },
-
- -- diagram 6
- {
- aborted = "ff0000",
- carrier = "ffff00",
- fifo = "00ff00",
- heartbeat = "0000ff",
- window = "8800ff"
- }
- }
-
-
- for i, name in ipairs(dtypes_names) do
-
- local dtypes = dtypes_list[i]
- local opts = { }
-
- opts.sources = { }
- opts.image = graph:mkpngpath( host, plugin, plugin_instance, "netlink" .. i )
- opts.title = host .. ": Netlink Statistiken - " .. name .. " auf " .. plugin_instance
- opts.rrd = { "-v", dtypes_units[i] }
- opts.colors = dtypes_colors[i]
-
- for dtype, dinstances in pairs(dtypes) do
- for i, inst in ipairs(dinstances) do
-
- local name = inst
- if name:len() == 0 then name = dtype end
-
- -- check for data source override
- if dtypes_sources[dtype] then
-
- -- has override
- for i, ds in ipairs(dtypes_sources[dtype]) do
- table.insert( opts.sources, {
- ds = ds, -- override
- name = name .. " (" .. ds .. ")",
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
- } )
- end
- else
- -- no override, assume single "value" data source
- table.insert( opts.sources, {
- name = name,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
- } )
- end
- end
- end
-
- table.insert( diagram_list, opts )
- end
-
- return diagram_list
-end
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/ping/ping.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/ping/ping.lua
deleted file mode 100644
index b041c015da..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/ping/ping.lua
+++ /dev/null
@@ -1,23 +0,0 @@
-module("luci.statistics.rrdtool.definitions.ping.ping", package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance, dtype )
-
- dtype_instances = graph.tree:data_instances( plugin, plugin_instance, dtype )
-
- opts = { }
- opts.sources = { }
- opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype )
- opts.title = host .. ": Pingzeiten"
- opts.rrd = { "-v", "Millisekunden" }
- opts.colors = { }
-
- for i, inst in ipairs(dtype_instances) do
- opts.sources[i] = {
- ds = "ping",
- name = inst,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
- }
- end
-
- return opts
-end
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/processes/ps_state.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/processes/ps_state.lua
deleted file mode 100644
index 07cbe1d4af..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/processes/ps_state.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-module("luci.statistics.rrdtool.definitions.processes.ps_state", package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance, dtype )
-
- dtype_instances = {
- "sleeping", "running", "paging", "blocked", "stopped", "zombies"
- }
-
- opts = { }
- opts.sources = { }
- opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype )
- opts.title = host .. ": Prozesse"
- opts.rrd = { "-v", "Anzahl" }
- opts.colors = {
- sleeping = "008080",
- running = "008000",
- paging = "ffff00",
- blocked = "ff5000",
- stopped = "555555",
- zombies = "ff0000"
- }
-
- for i, inst in ipairs(dtype_instances) do
- opts.sources[i] = {
- name = inst,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, "ps_state", inst )
- }
- end
-
- return opts
-end
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua
deleted file mode 100644
index 0493574948..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-module("luci.statistics.rrdtool.definitions.tcpconns.tcp_connections", package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance, dtype )
-
- dtype_instances = {
- "SYN_SENT", "SYN_RECV", "LISTEN", "ESTABLISHED", "LAST_ACK", "TIME_WAIT",
- "CLOSING", "CLOSE_WAIT", "CLOSED", "FIN_WAIT1", "FIN_WAIT2"
- }
-
- opts = { }
- opts.sources = { }
- opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype )
- opts.title = host .. ": TCP-Verbindungen - Port " .. plugin_instance
- opts.rrd = { "-v", "Anzahl" }
- opts.colors = {
-
- }
-
- for i, inst in ipairs(dtype_instances) do
- opts.sources[i] = {
- name = inst,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
- }
- end
-
- return opts
-end
diff --git a/applications/luci-statistics/src/statistics/rrdtool/definitions/wireless.lua b/applications/luci-statistics/src/statistics/rrdtool/definitions/wireless.lua
deleted file mode 100644
index e315ca5210..0000000000
--- a/applications/luci-statistics/src/statistics/rrdtool/definitions/wireless.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-module("luci.statistics.rrdtool.definitions.wireless", package.seeall)
-
-function rrdargs( graph, host, plugin, plugin_instance )
-
- dtypes = { "signal_power", "signal_noise" }
-
- opts = { }
- opts.sources = { }
- opts.image = graph:mkpngpath( host, plugin, plugin_instance, "wireless" )
- opts.title = host .. ": WLAN Signal"
- opts.rrd = { "-v", "dBm" }
- opts.colors = {
- signal_power = '0000ff',
- signal_noise = 'ff0000'
- }
-
- for i, dtype in ipairs(dtypes) do
- opts.sources[i] = {
- name = dtype,
- rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype )
- }
- end
-
- return opts
-end