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 <% node[:prometheus][:metrics].sort.each do |name, details| -%>
12 # HELP <%= name %> <%= details[:help] %>
13 # TYPE <%= name %> gauge
14 <%= name %>{<%= Hash(details[:labels]).map { |k,v| "#{k}=\"#{v}\"" }.join(",") %>} <%= details[:metric] || 1 %>