From: Tom Hughes Date: Sat, 23 Nov 2024 12:44:45 +0000 (+0000) Subject: Enable resolved prometheus exporter X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/07840ceab6077ffa7c498daeda4ecbd591c3bc40?hp=45fe31ef4a8d08f0b732d48fb17711ef54a020b9 Enable resolved prometheus exporter --- diff --git a/cookbooks/networking/metadata.rb b/cookbooks/networking/metadata.rb index c37012709..33baab1f4 100644 --- a/cookbooks/networking/metadata.rb +++ b/cookbooks/networking/metadata.rb @@ -6,3 +6,4 @@ description "Configures networking" version "1.0.0" depends "chef" +depends "ruby" diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index ea87c3b7b..2f60280f0 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -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 @@ -331,6 +333,16 @@ link "/etc/resolv.conf" do 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|