]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/recipes/smokeping.rb
imagery: fix dual encoding issue
[chef.git] / cookbooks / prometheus / recipes / smokeping.rb
index 4f9906d32cff7d8d43752373348eb703f013f90c..c626eb37cf91e04cf4b6061181d2c101c7ca7097 100644 (file)
@@ -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
@@ -39,6 +39,7 @@ end
 
 prometheus_exporter "smokeping" do
   port 9374
+  environment "GOMAXPROCS" => "1"
   options "--config.file=/etc/prometheus/exporters/smokeping.yml"
   capability_bounding_set "CAP_NET_RAW"
   ambient_capabilities "CAP_NET_RAW"