diff options
Diffstat (limited to 'applications/luci-app-statistics/root')
-rw-r--r-- | applications/luci-app-statistics/root/etc/config/luci_statistics | 3 | ||||
-rwxr-xr-x | applications/luci-app-statistics/root/usr/bin/stat-genconfig | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/root/etc/config/luci_statistics b/applications/luci-app-statistics/root/etc/config/luci_statistics index 8cc918e3db..1e841fec8a 100644 --- a/applications/luci-app-statistics/root/etc/config/luci_statistics +++ b/applications/luci-app-statistics/root/etc/config/luci_statistics @@ -66,6 +66,9 @@ config statistics 'collectd_cpu' config statistics 'collectd_cpufreq' option enable '0' +config statistics 'collectd_curl' + option enable '0' + config statistics 'collectd_df' option enable '0' option Devices '/dev/mtdblock/4' diff --git a/applications/luci-app-statistics/root/usr/bin/stat-genconfig b/applications/luci-app-statistics/root/usr/bin/stat-genconfig index 2bf63c1fe6..7d1349b249 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" }, |