From 2d1830422b90d3dadc07b2d1ee05b0dc8ef7c583 Mon Sep 17 00:00:00 2001 From: Chizhong Jin Date: Sun, 14 Oct 2018 02:34:49 +0800 Subject: 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 --- .../luci-app-statistics/root/usr/bin/stat-genconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'applications/luci-app-statistics/root/usr/bin/stat-genconfig') diff --git a/applications/luci-app-statistics/root/usr/bin/stat-genconfig b/applications/luci-app-statistics/root/usr/bin/stat-genconfig index 2bf63c1fe..7d1349b24 100755 --- a/applications/luci-app-statistics/root/usr/bin/stat-genconfig +++ b/applications/luci-app-statistics/root/usr/bin/stat-genconfig @@ -117,6 +117,21 @@ function config_exec( c ) return str end +function config_curl( c ) + local str = "" + + for s in pairs(sections) do + if sections[s][".type"] == "collectd_curl_page" then + str = str .. "\t\n" .. + "\t\tURL \"" .. sections[s].url .. "\"\n" .. + "\t\tMeasureResponseTime true\n" .. + "\t\n" + end + end + + return str +end + function config_iptables( c ) local str = "" @@ -297,6 +312,8 @@ plugins = { { } }, + curl = config_curl, + df = { { }, { "IgnoreSelected" }, -- cgit v1.2.3