1 # HELP chef_network_interface Information about network interfaces
2 # TYPE chef_network_interface gauge
3 <% node.interfaces do |interface| -%>
4 chef_network_interface{name="<%= interface[:interface] %>",role="<%= interface[:role].to_s %>",family="<%= interface[:family].to_s %>"} 1
6 # HELP chef_role Information about chef roles
8 <% node[:roles].sort.each do |role| -%>
9 chef_role{name="<%= role %>"} 1
11 <% if node[:roles].include?("tilecache") -%>
12 # HELP chef_tile_parent Information about tile cache parents
13 # TYPE chef_tile_parent gauge
14 chef_tile_parent{name="<%= node[:tilecache][:tile_parent].split(".").first %>"} 1
16 <% node[:prometheus][:metrics].sort.each do |name, details| -%>
17 # HELP <%= name %> <%= details[:help] %>
18 # TYPE <%= name %> gauge
19 <%= name %>{<%= details[:labels].map { |k,v| "#{k}=\"#{v}\"" }.join(",") %>} 1