X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/fa63c845987967418edaff22b75958916b19f19a..2e9d21a3cccb551f1a3d177327cb02b603a24e90:/cookbooks/prometheus/templates/default/chef.prom.erb?ds=sidebyside diff --git a/cookbooks/prometheus/templates/default/chef.prom.erb b/cookbooks/prometheus/templates/default/chef.prom.erb index f9be619f0..fd8089f4b 100644 --- a/cookbooks/prometheus/templates/default/chef.prom.erb +++ b/cookbooks/prometheus/templates/default/chef.prom.erb @@ -11,5 +11,5 @@ chef_role{name="<%= role %>"} 1 <% node[:prometheus][:metrics].sort.each do |name, details| -%> # HELP <%= name %> <%= details[:help] %> # TYPE <%= name %> gauge -<%= name %>{<%= details[:labels].map { |k,v| "#{k}=\"#{v}\"" }.join(",") %>} 1 +<%= name %>{<%= Hash(details[:labels]).map { |k,v| "#{k}=\"#{v}\"" }.join(",") %>} <%= details[:metric] || 1 %> <% end -%>