summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/root/usr/bin/stat-genconfig
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/root/usr/bin/stat-genconfig
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/root/usr/bin/stat-genconfig')
-rwxr-xr-xapplications/luci-app-statistics/root/usr/bin/stat-genconfig17
1 files changed, 17 insertions, 0 deletions
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<Page \"" .. sections[s].name .. "\">\n" ..
+ "\t\tURL \"" .. sections[s].url .. "\"\n" ..
+ "\t\tMeasureResponseTime true\n" ..
+ "\t</Page>\n"
+ end
+ end
+
+ return str
+end
+
function config_iptables( c )
local str = ""
@@ -297,6 +312,8 @@ plugins = {
{ }
},
+ curl = config_curl,
+
df = {
{ },
{ "IgnoreSelected" },