X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/9b77500da12107873265ae3da2c8a4557101d82f..c91319c9056f22e55798efd8e6931bbb49fc43a7:/cookbooks/prometheus/templates/default/chef.prom.erb diff --git a/cookbooks/prometheus/templates/default/chef.prom.erb b/cookbooks/prometheus/templates/default/chef.prom.erb index 13b753ef1..fd8089f4b 100644 --- a/cookbooks/prometheus/templates/default/chef.prom.erb +++ b/cookbooks/prometheus/templates/default/chef.prom.erb @@ -8,8 +8,8 @@ chef_network_interface{name="<%= interface[:interface] %>",role="<%= interface[: <% node[:roles].sort.each do |role| -%> chef_role{name="<%= role %>"} 1 <% end -%> -<% if node[:roles].include?("tilecache") -%> -# HELP chef_tile_parent Information about tile cache parents -# TYPE chef_tile_parent gauge -chef_tile_parent{name="<%= node[:tilecache][:tile_parent].split(".").first %>"} 1 +<% node[:prometheus][:metrics].sort.each do |name, details| -%> +# HELP <%= name %> <%= details[:help] %> +# TYPE <%= name %> gauge +<%= name %>{<%= Hash(details[:labels]).map { |k,v| "#{k}=\"#{v}\"" }.join(",") %>} <%= details[:metric] || 1 %> <% end -%>