summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua57
1 files changed, 38 insertions, 19 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
index e290af549a..6ad11985ec 100644
--- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
@@ -9,25 +9,44 @@ end
function rrdargs( graph, plugin, plugin_instance, dtype )
- return {
- -- Ping roundtrip time
- { 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 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"
+ }
+ }
+ }
+ }
- -- Ping 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 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