Merge pull request #2779 from hwti/statistics-ping-addressfamily
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 26 Jun 2019 12:22:33 +0000 (14:22 +0200)
committerGitHub <noreply@github.com>
Wed, 26 Jun 2019 12:22:33 +0000 (14:22 +0200)
luci-app-statistics: add address family configuration for ping

applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
applications/luci-app-statistics/root/usr/bin/stat-genconfig

index 3179da63b50050303884eaf2f12171ee904da91d..bcee6efe0890fb81f988cf04898dfd569f599ed9 100644 (file)
@@ -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
index 55cc6979e52d8006c62fcbc8f99c9d62968e1ab9..cb091ae6724cf5a007ba87a00fe72a879bba5166 100755 (executable)
@@ -411,7 +411,7 @@ plugins = {
        },
 
        ping    = {
-               { "TTL", "Interval" },
+               { "TTL", "Interval", "AddressFamily" },
                { },
                { "Hosts" }
        },