X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2835205c501da417ff80ce4f06dc32d14c8c38bb..41c52dd81080eb0a88e786966bed3fa6bac9cca5:/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 8d6506eae..58235e3b4 100644 --- a/cookbooks/prometheus/templates/default/chef.prom.erb +++ b/cookbooks/prometheus/templates/default/chef.prom.erb @@ -1,8 +1,12 @@ # HELP chef_network_interface Information about network interfaces # TYPE chef_network_interface gauge <% node.interfaces.each do |interface| -%> +<% if interface[:interface] =~ /^bond\d+$/ -%> +chef_network_interface{name="<%= interface[:interface] %>",role="<%= interface[:role].to_s %>",bond_mode="<%= interface[:bond][:mode] || 'active-backup' %>"} 1 +<% else -%> chef_network_interface{name="<%= interface[:interface] %>",role="<%= interface[:role].to_s %>"} 1 <% end -%> +<% end -%> # HELP chef_role Information about chef roles # TYPE chef_role gauge <% node[:roles].sort.each do |role| -%>