summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorKevin Fenzi <kevin@scrye.com>2017-09-09 19:11:06 +0000
committerKevin Fenzi <kevin@scrye.com>2017-09-09 19:11:06 +0000
commit8b5a273b108243ca9c6cd5bdd066db47c15148ee (patch)
treec585123efb6cf87b661af6ef44aad00ce64c708e /roles
parent0c321472811e5588d3b96135c8752a855ac07620 (diff)
downloadansible-8b5a273b108243ca9c6cd5bdd066db47c15148ee.tar.gz
ansible-8b5a273b108243ca9c6cd5bdd066db47c15148ee.tar.xz
ansible-8b5a273b108243ca9c6cd5bdd066db47c15148ee.zip
try and teach nagios about hosts we want to monitor swap on and ones we do not want to
Diffstat (limited to 'roles')
-rw-r--r--roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j23
1 files changed, 1 insertions, 2 deletions
diff --git a/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2
index 9f5bd8ca1..7da23285c 100644
--- a/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2
+++ b/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2
@@ -1,6 +1,5 @@
define hostgroup {
hostgroup_name CheckSwap
alias Swap-Is-Low
- members *, !status-fedora2, !registry-cdn, !phx2-gw, !ibiblio-gw, !cloud-gw, !bodhost-gw, !coloamer-gw, !dedicated-gw, !host1plus-gw, !internetx-gw, !osuosl-gw, !rdu-gw, !rdu-cc-gw, !tummy-gw, !proxy05.fedoraproject.org, !mirrorlist-host1plus.fedoraproject.org, !download-rdu01.fedoraproject.org, !virthost-rdu01.fedoraproject.org, !fas3-01.stg.phx2.fedoraproject.org, !osbs-control01.phx2.fedoraproject.org, {% for host in groups['builders'] %}!{{host}},{% endfor %} {% for host in groups['builders-stg'] %}!{{host}},{% endfor %} {% for host in groups['cloud'] %}!{{host}}, {% endfor %} {% for host in vars['phx2_management_limited'] %}!{{host}},{% endfor %} {% for host in vars['phx2_management_hosts'] %}!{{host}}{% if not loop.last %},{% endif %} {% endfor %}
-
+ members {% for host in groups['all'] %}{% if hostvars[host].nagios_Check_Services['swap'] == true %}{{host}}{% if not loop.last %},{% endif %} {% endfor %}
}