summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/statistics
diff options
context:
space:
mode:
authorChizhong Jin <pjincz@gmail.com>2018-10-14 02:34:49 +0800
committerChizhong Jin <pjincz@gmail.com>2018-10-14 02:34:49 +0800
commit2d1830422b90d3dadc07b2d1ee05b0dc8ef7c583 (patch)
tree63ebbb3e12c8e2d563fd3bcaa78dfacfd3ca751c /applications/luci-app-statistics/luasrc/statistics
parent4f9e23f2b6cc42b8c534d32ec8669b1583c22cc0 (diff)
pp-statistics: add support for cUrl
Add collectd-mod-curl plugin support. Which can do some complex track, such as grab stock, but by now, only response time are supported. Signed-off-by: Chizhong Jin <pjincz@gmail.com>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/statistics')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua
new file mode 100644
index 0000000000..89a65a6b5f
--- /dev/null
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua
@@ -0,0 +1,22 @@
+-- Copyright 2018 Chizhong Jin <pjincz@gmail.com>
+-- Licensed to the public under the BSD 3-clause license
+
+module("luci.statistics.rrdtool.definitions.curl", package.seeall)
+
+function rrdargs( graph, plugin, plugin_instance, dtype )
+ return {
+ title = "%H: cUrl Response Time for #%pi",
+ y_min = "0",
+ alt_autoscale_max = true,
+ vlabel = "Response Time",
+ number_format = "%5.1lf%Ss",
+ data = {
+ types = { "response_time" },
+ options = {
+ response_time = {
+ title = ""
+ }
+ }
+ }
+ }
+end