diff options
Diffstat (limited to '')
18 files changed, 193 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/config.json b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/config.json new file mode 100644 index 000000000..6df6faec6 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/config.json @@ -0,0 +1,6 @@ +{ + "update_every": 123, + "leases_path": "ok", + "conf_path": "ok", + "conf_dir": "ok" +} diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/config.yaml b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/config.yaml new file mode 100644 index 000000000..4a03e6db8 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/config.yaml @@ -0,0 +1,4 @@ +update_every: 123 +leases_path: "ok" +conf_path: "ok" +conf_dir: "ok" diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.conf new file mode 100644 index 000000000..4cf77478e --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.conf @@ -0,0 +1,77 @@ +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=192.168.0.50,192.168.0.150,12h + +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h + +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 + +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h + +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static + +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only + +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h + +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac + +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless + +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names + +dhcp-range=192.168.0.1,192.168.0.100,12h +dhcp-range = 1230::1, 1230::64 + +dhcp-range = 1235::2, 1235::500, ra-stateless +dhcp-range=1234::, ra-stateless, ra-names +dhcp-range=1234::, ra-stateless +dhcp-range=1234::, ra-only, 48h + +dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.99 +dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1230::63] + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/.dnsmasq.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/.dnsmasq.conf new file mode 100644 index 000000000..b9ca78218 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/.dnsmasq.conf @@ -0,0 +1 @@ +dhcp-range=tag:green,192.168.11.1,192.168.11.100,12h
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/dnsmasqv4.any b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/dnsmasqv4.any new file mode 100644 index 000000000..300faa28e --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/dnsmasqv4.any @@ -0,0 +1,10 @@ +dhcp-range=tag:green,192.168.1.1,192.168.1.100,12h + +dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.1.99 + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/dnsmasqv6.any b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/dnsmasqv6.any new file mode 100644 index 000000000..414d6819f --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d/dnsmasqv6.any @@ -0,0 +1,10 @@ +dhcp-range = 1231::1, 1231::64 + +dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1231::63] + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/dnsmasqv4.any b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/dnsmasqv4.any new file mode 100644 index 000000000..24a742797 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/dnsmasqv4.any @@ -0,0 +1,10 @@ +dhcp-range=tag:green,192.168.2.1,192.168.2.100,12h + +dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.2.99 + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/dnsmasqv6.any b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/dnsmasqv6.any new file mode 100644 index 000000000..4ae70f0b2 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/dnsmasqv6.any @@ -0,0 +1,10 @@ +dhcp-range = 1232::1, 1232::64 + +dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1232::63] + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/~dnsmasq.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/~dnsmasq.conf new file mode 100644 index 000000000..dc58bf9d8 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d2/~dnsmasq.conf @@ -0,0 +1 @@ +dhcp-range=192.168.22.0,192.168.22.255,12h
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasq.bak b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasq.bak new file mode 100644 index 000000000..c3897671a --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasq.bak @@ -0,0 +1 @@ +dhcp-range=tag:green,192.168.33.1,192.168.33.100,12h
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasqv4.any b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasqv4.any new file mode 100644 index 000000000..a55ac969a --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasqv4.any @@ -0,0 +1,10 @@ +dhcp-range=tag:green,192.168.3.1,192.168.3.100,12h + +dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.3.99 + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasqv6.any b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasqv6.any new file mode 100644 index 000000000..4bc6cf10f --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d3/dnsmasqv6.any @@ -0,0 +1,3 @@ +dhcp-range = 1233::1, 1233::64 + +dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1233::63]
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasq.other b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasq.other new file mode 100644 index 000000000..18fe1ac53 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasq.other @@ -0,0 +1 @@ +dhcp-range=tag:green,192.168.44.1,192.168.44.100,12h
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasqv4.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasqv4.conf new file mode 100644 index 000000000..1493b8009 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasqv4.conf @@ -0,0 +1,10 @@ +dhcp-range=tag:green,192.168.4.1,192.168.4.100,12h + +dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.4.99 + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasqv6.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasqv6.conf new file mode 100644 index 000000000..389c2c95b --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.d4/dnsmasqv6.conf @@ -0,0 +1,10 @@ +dhcp-range = 1234::1, 1234::64 + +dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::63] + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf + +conf-dir=testdata/dnsmasq.d2 +conf-dir=testdata/dnsmasq.d3,.bak +conf-dir=testdata/dnsmasq.d4,*.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.leases b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.leases new file mode 100644 index 000000000..606e74fba --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq.leases @@ -0,0 +1,19 @@ +1560300536 08:00:27:61:3c:ee 192.168.0.1 * * +1560300536 08:00:27:61:3c:ee 192.168.0.2 * * +1560300536 08:00:27:61:3c:ee 192.168.0.3 * * +1560300536 08:00:27:61:3c:ee 192.168.0.4 * * +1560300536 08:00:27:61:3c:ee 192.168.0.5 * * +1560300536 08:00:27:61:3c:ee 192.168.1.1 * * +1560300536 08:00:27:61:3c:ee 192.168.1.2 * * +1560300536 08:00:27:61:3c:ee 192.168.1.3 * * +1560300536 08:00:27:61:3c:ee 192.168.1.4 * * +1560300536 08:00:27:61:3c:ee 192.168.2.1 * * +1560300536 08:00:27:61:3c:ee 192.168.2.2 * * +1560300536 08:00:27:61:3c:ee 192.168.2.3 * * +duid 00:01:00:01:24:90:cf:5b:08:00:27:61:2e:2c +1560300414 660684014 1230::1 * 00:01:00:01:24:90:cf:a3:08:00:27:61:3c:ee +1560300414 660684014 1230::2 * 00:01:00:01:24:90:cf:a3:08:00:27:61:3c:ee +1560300414 660684014 1230::3 * 00:01:00:01:24:90:cf:a3:08:00:27:61:3c:ee +1560300414 660684014 1230::4 * 00:01:00:01:24:90:cf:a3:08:00:27:61:3c:ee +1560300414 660684014 1230::5 * 00:01:00:01:24:90:cf:a3:08:00:27:61:3c:ee +1560300414 660684014 1230::6 * 00:01:00:01:24:90:cf:a3:08:00:27:61:3c:ee diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq2.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq2.conf new file mode 100644 index 000000000..bd1766adb --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq2.conf @@ -0,0 +1,6 @@ +dhcp-range=192.168.200.1,192.168.200.100,12h + +dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.200.99 + +conf-file=testdata/dnsmasq.conf +conf-file=testdata/dnsmasq2.conf
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq3.conf b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq3.conf new file mode 100644 index 000000000..3475544b5 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/dnsmasq_dhcp/testdata/dnsmasq3.conf @@ -0,0 +1,4 @@ +#dhcp-range=192.168.0.50,192.168.0.150,12h +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h +#dhcp-range=set:red,192.168.0.50,192.168.0.150 +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h
\ No newline at end of file |