Skip to content

Commit 07840ce

Browse files
committed
Enable resolved prometheus exporter
1 parent 45fe31e commit 07840ce

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cookbooks/networking/metadata.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66

77
version "1.0.0"
88
depends "chef"
9+
depends "ruby"

cookbooks/networking/recipes/default.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
require "ipaddr"
2424
require "yaml"
2525

26+
include_recipe "ruby"
27+
2628
keys = data_bag_item("networking", "keys")
2729

2830
file "/etc/netplan/00-installer-config.yaml" do
@@ -331,6 +333,16 @@
331333
to "../run/systemd/resolve/stub-resolv.conf"
332334
end
333335

336+
gem_package "dbus-systemd" do
337+
gem_binary node[:ruby][:gem]
338+
end
339+
340+
prometheus_exporter "resolved" do
341+
port 10028
342+
user "systemd-resolve"
343+
restrict_address_families "AF_UNIX"
344+
end
345+
334346
hosts = { :inet => [], :inet6 => [] }
335347

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

0 commit comments

Comments
 (0)