ups_inst[t] = graph.tree:data_instances( plugin, plugin_instance, t )
end
-
- -- Check if hash table or array is empty or nil-filled
+ -- Check if hash table or array is empty or nil-filled
local function empty( t )
for _, v in pairs(t) do
end
- -- Graph definitions for APC UPS measurements MUST use only 'instances':
- -- e.g. instances = { voltage = { "input", "output" } }
+ -- 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",
module("luci.statistics.rrdtool.definitions.conntrack",package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
+
return {
title = "%H: Conntrack entries",
vlabel = "Count",
module("luci.statistics.rrdtool.definitions.curl", package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
+
return {
title = "%H: cUrl Response Time for #%pi",
y_min = "0",
module("luci.statistics.rrdtool.definitions.disk", package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
+
return {
{
title = "%H: Disk I/O operations on %pi",
}
}
-
--
-- packet diagram
--
}
}
-
--
-- multicast diagram
--
}
}
-
--
-- collision diagram
--
}
}
-
--
-- error diagram
--
}
}
-
return { traffic, packets, multicast, collisions, errors }
end
if plugin_instance == "routes" then
g[#g+1] = {
- -- diagram data description
+ -- diagram data description
title = "%H: Total amount of OLSR routes", vlabel = "n",
number_format = "%5.0lf", data = {
- types = { "routes" },
+ 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.2lf", detail = true,
data = {
types = { "signal_quality" },
-
+
instances = {
signal_quality = { instances[i], instances[i+1] },
},
title= "%H: Total amount of OLSR links", vlabel = "n",
number_format = "%5.0lf", data = {
instances = { "" },
- types = { "links" },
+ types = { "links" },
options = {
links = {
color = "0000ff",
}
}
}
- }
+ }
g[#g+1] = {
title= "%H: Average signal quality", vlabel = "n",
module("luci.statistics.rrdtool.definitions.ping", package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
+
return {
-- Ping roundtrip time
{ title = "%H: ICMP Round Trip Time",
function rrdargs( graph, plugin, plugin_instance, dtype )
- if plugin_instance == "" then
- return {
+ if plugin_instance == "" then
+ return {
title = "%H: Processes",
vlabel = "Processes/s",
data = {
ps_state_zombies = { color = "ff0000", title = "Zombies" }
}
}
- }
- else
- return {
+ }
+ else
+ return {
{
title = "%H: CPU time used by %pi",
vlabel = "Jiffies",
}
}
}
- end
+ end
end
module("luci.statistics.rrdtool.definitions.sensors", package.seeall)
function rrdargs( graph, plugin, plugin_instance )
+
return {
{
per_instance = true,
-- 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 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
+ 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
module("luci.statistics.rrdtool.definitions.tcpconns", package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
+
return {
title = "%H: TCP connections to port %pi",
vlabel = "Connections/s",
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 }
- }
- }
- }
-
+ return {
+ title = "%H: Uptime", vlabel = "seconds",
+ number_format = "%5.0lf%s", data = {
+ types = { "uptime" },
+ options = {
+ uptime = { title = "Uptime %di", noarea = true }
+ }
+ }
+ }
end