diff --git a/telegraf/files/in_dhcpd-pool.conf b/telegraf/files/in_dhcpd-pool.conf index 2ffa0f9..f7447d7 100644 --- a/telegraf/files/in_dhcpd-pool.conf +++ b/telegraf/files/in_dhcpd-pool.conf @@ -3,5 +3,31 @@ "/usr/bin/dhcpd-pools -c /etc/dhcp/dhcpd.conf --format=j", ] timeout = "5s" - name_suffix = "_exec" + name_override = "dhcpd_pools_shared_networks" data_format = "json" + json_query = "shared-networks" + tag_keys = [ + "location", + ] + +[[inputs.exec]] + commands = [ + "/usr/bin/dhcpd-pools -c /etc/dhcp/dhcpd.conf --format=j", + ] + timeout = "5s" + name_override = "dhcpd_pools_subnets" + data_format = "json" + json_query = "subnets" + tag_keys = [ + "location", + "range", + ] + +[[inputs.exec]] + commands = [ + "/usr/bin/dhcpd-pools -c /etc/dhcp/dhcpd.conf --format=j", + ] + timeout = "5s" + name_override = "dhcpd_pools_summary" + data_format = "json" + json_query = "summary"