luci-app-statistics: cleanup ping definitions

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2019-09-13 14:01:36 +02:00
parent 00fc5548ff
commit cb252b2c03

View file

@ -9,25 +9,44 @@ end
function rrdargs( graph, plugin, plugin_instance, dtype ) function rrdargs( graph, plugin, plugin_instance, dtype )
return { local ping = {
-- Ping roundtrip time title = "%H: ICMP Round Trip Time",
{ title = "%H: ICMP Round Trip Time", vlabel = "ms",
vlabel = "ms", number_format = "%5.1lf ms",
number_format = "%5.1lf ms", data = {
data = { sources = {
sources = { ping = { "value" } }, ping = {
options = { ping__value = { "value"
noarea = true, overlay = true, title = "%di" } } }
} }, },
options = {
-- Ping droprate ping__value = {
{ title = "%H: ICMP Drop Rate", noarea = true,
vlabel = "%", overlay = true,
number_format = "%5.2lf %%", title = "%di"
data = { }
types = { "ping_droprate" }, }
options = { ping_droprate = { }
noarea = true, overlay = true, title = "%di", transform_rpn = "100,*" } }
} }
} }
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,*"
}
}
}
}
return { ping, droprate }
end end