X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e3618ba243a881e01ada64aaab68e131fe90d6c8..57d7cd3ecda47266cc08d7e97b13e606405eb2a8:/cookbooks/prometheus/recipes/smokeping.rb?ds=sidebyside diff --git a/cookbooks/prometheus/recipes/smokeping.rb b/cookbooks/prometheus/recipes/smokeping.rb index 5f11d2c90..27b0c6dd6 100644 --- a/cookbooks/prometheus/recipes/smokeping.rb +++ b/cookbooks/prometheus/recipes/smokeping.rb @@ -25,8 +25,8 @@ ip6_hosts = [] search(:node, "networking:interfaces") do |host| next if host.name == node.name - ip4_hosts << host[:fqdn] unless host.interfaces(:role => :external, :family => :inet).empty? - ip6_hosts << host[:fqdn] unless host.interfaces(:role => :external, :family => :inet6).empty? + ip4_hosts << host[:fqdn] unless host.ipaddresses(:role => :external, :family => :inet).empty? + ip6_hosts << host[:fqdn] unless host.ipaddresses(:role => :external, :family => :inet6).empty? end template "/etc/prometheus/exporters/smokeping.yml" do @@ -43,4 +43,5 @@ prometheus_exporter "smokeping" do capability_bounding_set "CAP_NET_RAW" ambient_capabilities "CAP_NET_RAW" private_users false + subscribes :restart, "template[/etc/prometheus/exporters/smokeping.yml]" end