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 = { ping = { "value" } }, sources = {
options = { ping__value = { ping = {
noarea = true, overlay = true, title = "%di" } } "value"
} }, }
},
options = {
ping__value = {
noarea = true,
overlay = true,
title = "%di"
}
}
}
}
-- Ping droprate local droprate = {
{ title = "%H: ICMP Drop Rate", title = "%H: ICMP Drop Rate",
vlabel = "%", vlabel = "%",
number_format = "%5.2lf %%", number_format = "%5.2lf %%",
data = { data = {
types = { "ping_droprate" }, types = {
options = { ping_droprate = { "ping_droprate"
noarea = true, overlay = true, title = "%di", transform_rpn = "100,*" } } },
} } options = {
ping_droprate = {
noarea = true,
overlay = true,
title = "%di",
transform_rpn = "100,*"
} }
}
}
}
return { ping, droprate }
end end