Skip to content

Commit

Permalink
Improve Influx data format for dhcpd leases
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett committed Sep 18, 2024
1 parent 8cc57b1 commit 0d898e2
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 0d898e2

Please sign in to comment.