X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-statistics%2Fluasrc%2Fstatistics%2Frrdtool%2Fdefinitions%2Fping.lua;fp=applications%2Fluci-statistics%2Fluasrc%2Fstatistics%2Frrdtool%2Fdefinitions%2Fping.lua;h=3b77cf14081621e52ac4c8a56dae6bfe7a03b4a4;hb=5d4191c848e568570ebd3b63358379c9861b2b02;hp=0000000000000000000000000000000000000000;hpb=ef9df734c35e0d478dd7c9c03d301085fdfd3993;p=project%2Fluci.git diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping.lua new file mode 100644 index 000000000..3b77cf140 --- /dev/null +++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/ping.lua @@ -0,0 +1,41 @@ +--[[ + +Luci statistics - ping plugin diagram definition +(c) 2008 Freifunk Leipzig / Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id: ping.lua 6810 2011-01-29 03:33:48Z jow $ + +]]-- + +module("luci.statistics.rrdtool.definitions.ping", package.seeall) + +function rrdargs( graph, plugin, plugin_instance, dtype, is_index ) + return { + -- Ping roundtrip time + { title = "%H: ICMP Round Trip Time", vlabel = "ms", + number_format = "%5.1lf ms", data = { + sources = { ping = { "ping" } }, + options = { ping__ping = { noarea = true, title = "%di" } } + } }, + + -- Ping droprate + { title = "%H: ICMP Drop Rate", vlabel = "%", + number_format = "%5.2lf %%", data = { + types = { "ping_droprate" }, + options = { ping_droprate = { title = "%di" } } + } }, + + -- Ping standard deviation + { title = "%H: ICMP Standard Deviation", vlabel = "ms", + number_format = "%5.2lf ms", data = { + types = { "ping_stddev" }, + options = { ping_stddev = { title = "%di" } } + } }, + } +end