347d756f7c592469ec714874a5dea22389419c69
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / ping.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.statistics.rrdtool.definitions.ping", package.seeall)
5
6 function rrdargs( graph, plugin, plugin_instance, dtype )
7         return {
8                 -- Ping roundtrip time
9                 { title = "%H: ICMP Round Trip Time", vlabel = "ms",
10                   number_format = "%5.1lf ms", data = {
11                         sources = { ping = { "value" } },
12                         options = { ping__value = { noarea = true, title = "%di" } }
13                 } },
14
15                 -- Ping droprate
16                 { title = "%H: ICMP Drop Rate", vlabel = "%",
17                   number_format = "%5.2lf %%", data = {
18                         types   = { "ping_droprate" },
19                         options = { ping_droprate = { title = "%di" } }
20                 } },
21
22                 -- Ping standard deviation
23                 { title = "%H: ICMP Standard Deviation", vlabel = "ms",
24                   number_format = "%5.2lf ms", data = {
25                         types   = { "ping_stddev" },
26                         options = { ping_stddev = { title = "%di" } }
27                 } },
28         }
29 end