1 # HELP chef_network_interface Information about network interfaces
2 # TYPE chef_network_interface gauge
3 <% node.interfaces.each do |interface| -%>
4 <% if interface[:interface] =~ /^bond\d+$/ -%>
5 chef_network_interface{name="<%= interface[:interface] %>",role="<%= interface[:role].to_s %>",bond_mode="<%= interface[:bond][:mode] || 'active-backup' %>"} 1
7 chef_network_interface{name="<%= interface[:interface] %>",role="<%= interface[:role].to_s %>"} 1
10 # HELP chef_role Information about chef roles
11 # TYPE chef_role gauge
12 <% node[:roles].sort.each do |role| -%>
13 chef_role{name="<%= role %>"} 1
15 <% node[:prometheus][:metrics].sort.each do |name, details| -%>
16 # HELP <%= name %> <%= details[:help] %>
17 # TYPE <%= name %> gauge
18 <%= name %>{<%= Hash(details[:labels]).map { |k,v| "#{k}=\"#{v}\"" }.join(",") %>} <%= details[:metric] || 1 %>