diff --git a/inventory/inventory b/inventory/inventory index 4a341f36b8..3d828a6eb1 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -1075,6 +1075,11 @@ fed-cloud15.cloud.fedoraproject.org #fed-cloud-ppc01.cloud.fedoraproject.org fed-cloud-ppc02.cloud.fedoraproject.org +# Group for hosts we don't want to monitor with nagios. +[nomonitor:children] +newcloud-control +newcloud-compute + [newcloud:children] newcloud-control newcloud-compute diff --git a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 index 466dfba57c..cc77de0eb0 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 @@ -2,11 +2,8 @@ # All Servers and associated devices ############### ## {{ env }} - {% for key, value in groups.iteritems() %} -{% if groups[key] != [] %} -{% for host in groups[key] %} -{% if hostvars[host].nagios_Check_Services['monitor'] == true %} +{% if groups[key] != [] and groups[key] != 'nomonitor' %} define hostgroup{ hostgroup_name {{ key }} alias {{ key }} @@ -15,8 +12,6 @@ define hostgroup{ } {% endif %} {% endfor %} -{% endif %} -{% endfor %} ## Services with minimal monitoring define hostgroup{