Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d65c856c authored by JACQUOT Pierre's avatar JACQUOT Pierre
Browse files

[network_monitoring] Do not generate config for interface not monitored

parent 4fd0a820
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ def generate_puppet_network_monitoring(options) ...@@ -67,7 +67,7 @@ def generate_puppet_network_monitoring(options)
next if p == {} next if p == {}
next unless %w[other switch router server channel backbone].include?(p['kind']) next unless %w[other switch router server channel backbone].include?(p['kind'])
next if !p['monitoring_enabled'].nil? and p['monitoring_enabled'] == false
port_name = p['snmp_name'] port_name = p['snmp_name']
next if net_hosts_eq['interfaces'].find { |i| i['name'] == port_name } next if net_hosts_eq['interfaces'].find { |i| i['name'] == port_name }
...@@ -83,7 +83,7 @@ def generate_puppet_network_monitoring(options) ...@@ -83,7 +83,7 @@ def generate_puppet_network_monitoring(options)
next unless eq_v['channels'] next unless eq_v['channels']
eq_v['channels'].each do |c_name, c_v| eq_v['channels'].each do |c_name, c_v|
next if net_hosts_eq['interfaces'].find { |i| i['name'] == c_name } next if net_hosts_eq['interfaces'].find { |i| i['name'] == c_name }
next if !c_v['monitoring_enabled'].nil? and c_v['monitoring_enabled'] == false
net_hosts_eq['interfaces'] << { net_hosts_eq['interfaces'] << {
'name' => c_name, 'name' => c_name,
'description' => "LACP #{c_v['uid']}" 'description' => "LACP #{c_v['uid']}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment