summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping')
-rw-r--r--applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping/ping.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping/ping.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping/ping.lua
new file mode 100644
index 000000000..b041c015d
--- /dev/null
+++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping/ping.lua
@@ -0,0 +1,23 @@
+module("luci.statistics.rrdtool.definitions.ping.ping", package.seeall)
+
+function rrdargs( graph, host, plugin, plugin_instance, dtype )
+
+ dtype_instances = graph.tree:data_instances( plugin, plugin_instance, dtype )
+
+ opts = { }
+ opts.sources = { }
+ opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype )
+ opts.title = host .. ": Pingzeiten"
+ opts.rrd = { "-v", "Millisekunden" }
+ opts.colors = { }
+
+ for i, inst in ipairs(dtype_instances) do
+ opts.sources[i] = {
+ ds = "ping",
+ name = inst,
+ rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
+ }
+ end
+
+ return opts
+end