summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-06-26 14:22:33 +0200
committerGitHub <noreply@github.com>2019-06-26 14:22:33 +0200
commiteec28ed7b80e8614139a681121cbe1545d2514a5 (patch)
treeb8db405c6bde65a422d797ad82a2db0507099736
parentfb0fedca48c745cff04100aa1ca6447bafe12233 (diff)
parentaf5771426bce71cac7d78048ea66f874cfb58f7e (diff)
Merge pull request #2779 from hwti/statistics-ping-addressfamily
luci-app-statistics: add address family configuration for ping
-rw-r--r--applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua8
-rwxr-xr-xapplications/luci-app-statistics/root/usr/bin/stat-genconfig2
2 files changed, 9 insertions, 1 deletions
diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
index 3179da63b5..bcee6efe08 100644
--- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
+++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
@@ -20,6 +20,14 @@ hosts = s:option( Value, "Hosts", translate("Monitor hosts"), translate ("Add mu
hosts.default = "127.0.0.1"
hosts:depends( "enable", 1 )
+-- collectd_ping.adressfamily (AddressFamily)
+addressfamily = s:option( ListValue, "AddressFamily", translate("Address family") )
+addressfamily.default = "any"
+addressfamily:value( "any" )
+addressfamily:value( "ipv4" )
+addressfamily:value( "ipv6" )
+addressfamily:depends( "enable", 1 )
+
-- collectd_ping.ttl (TTL)
ttl = s:option( Value, "TTL", translate("TTL for ping packets") )
ttl.isinteger = true
diff --git a/applications/luci-app-statistics/root/usr/bin/stat-genconfig b/applications/luci-app-statistics/root/usr/bin/stat-genconfig
index 55cc6979e5..cb091ae672 100755
--- a/applications/luci-app-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-app-statistics/root/usr/bin/stat-genconfig
@@ -411,7 +411,7 @@ plugins = {
},
ping = {
- { "TTL", "Interval" },
+ { "TTL", "Interval", "AddressFamily" },
{ },
{ "Hosts" }
},