Skip to content

Commit

Permalink
Enable resolved prometheus exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Nov 23, 2024
1 parent 45fe31e commit 07840ce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions cookbooks/networking/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

version "1.0.0"
depends "chef"
depends "ruby"
12 changes: 12 additions & 0 deletions cookbooks/networking/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
require "ipaddr"
require "yaml"

include_recipe "ruby"

keys = data_bag_item("networking", "keys")

file "/etc/netplan/00-installer-config.yaml" do
Expand Down Expand Up @@ -331,6 +333,16 @@
to "../run/systemd/resolve/stub-resolv.conf"
end

gem_package "dbus-systemd" do
gem_binary node[:ruby][:gem]
end

prometheus_exporter "resolved" do
port 10028
user "systemd-resolve"
restrict_address_families "AF_UNIX"
end

hosts = { :inet => [], :inet6 => [] }

search(:node, "networking:interfaces").collect do |n|
Expand Down

0 comments on commit 07840ce

Please sign in to comment.