diff options
author | varac <varacanero@zeromail.org> | 2015-07-06 14:48:10 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-07-06 14:48:10 +0200 |
commit | 73f83d847540a0f679d23f5dc86660b55959710a (patch) | |
tree | b5cf7ff0330864faeb79cad9011cc97979551c9e /puppet/modules/site_check_mk | |
parent | 7b9c1068754269046a2dab0015ae0d2935c71817 (diff) |
Don't monitor disabled nodes (#7235)
Change-Id: I51ce8a9e8773d267c270a1725a497f9a43f2e9ff
Sidenote: $nagios_hosts was never used
Diffstat (limited to 'puppet/modules/site_check_mk')
-rw-r--r-- | puppet/modules/site_check_mk/manifests/server.pp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/puppet/modules/site_check_mk/manifests/server.pp b/puppet/modules/site_check_mk/manifests/server.pp index 171f1576..67519513 100644 --- a/puppet/modules/site_check_mk/manifests/server.pp +++ b/puppet/modules/site_check_mk/manifests/server.pp @@ -1,3 +1,4 @@ +# setup check_mk on the monitoring server class site_check_mk::server { $ssh_hash = hiera('ssh') @@ -6,10 +7,9 @@ class site_check_mk::server { $seckey = $ssh_hash['monitor']['private_key'] $nagios_hiera = hiera_hash('nagios') - $nagios_hosts = $nagios_hiera['hosts'] + $hosts = $nagios_hiera['hosts'] - $hosts = hiera_hash('hosts') - $all_hosts = inline_template ('<% @hosts.keys.sort.each do |key| -%>"<%= @hosts[key]["domain_internal"] %>", <% end -%>') + $all_hosts = inline_template ('<% @hosts.keys.sort.each do |key| -%><% if @hosts[key]["environment"] != "disabled" %>"<%= @hosts[key]["domain_internal"] %>", <% end -%><% end -%>') $domains_internal = $nagios_hiera['domains_internal'] $environments = $nagios_hiera['environments'] |