luci-app-statistics: add ping stddev definition 3063/head
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 13 Sep 2019 12:10:01 +0000 (14:10 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 13 Sep 2019 12:14:45 +0000 (14:14 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua

index 6ad11985ecfb26e9addc17d0ead83d4d671ce658..b8d11c0759321ed3170e75f60751d5e03a146ed7 100644 (file)
@@ -48,5 +48,23 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                }
        }
 
-       return { ping, droprate }
+       local stddev = {
+               title = "%H: ICMP Standard Deviation",
+               vlabel = "ms",
+               number_format = "%5.1lf ms",
+               data = {
+                       types   = {
+                               "ping_stddev"
+                       },
+                       options = {
+                               ping_stddev = {
+                                       noarea = true,
+                                       overlay = true,
+                                       title = "%di"
+                               }
+                       }
+               }
+       }
+
+       return { ping, droprate, stddev }
 end