Skip to content

Commit

Permalink
Merge pull request #172 from DasSkelett/telegraf-dhcpd
Browse files Browse the repository at this point in the history
Improve Telegraf JSON parsing template for dhcpd leases
  • Loading branch information
DasSkelett authored Dec 1, 2024
2 parents 564369c + 0d898e2 commit 9a9d749
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion telegraf/files/in_dhcpd-pool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 9a9d749

Please sign in to comment.