From 6a411fae1b30310d31ad8cf12a19a5bc81d1ed8c Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 9 Jun 2020 11:27:52 -0400 Subject: [PATCH] try to clean up --- inventory/host_vars/qa09.qa.fedoraproject.org | 9 +++++++++ .../templates/nagios/hostgroups/checkswap.cfg.j2 | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/inventory/host_vars/qa09.qa.fedoraproject.org b/inventory/host_vars/qa09.qa.fedoraproject.org index b2c3ee6977..e5a829e5be 100644 --- a/inventory/host_vars/qa09.qa.fedoraproject.org +++ b/inventory/host_vars/qa09.qa.fedoraproject.org @@ -24,3 +24,12 @@ openqa_workers: 10 # $ENV{QEMUPORT} = ($options{instance}) * 10 + 20002; # so for worker 1 it's 20012, for worker 2 it's 20022, etc etc tcp_ports: ['20013', '20023', '20033', '20043', '20053', '20063', '20073', '20083', '20093', '20103'] +nagios_Can_Connect: false + +nagios_Check_Services: + nrpe: false + sshd: false + named: false + dhcpd: false + httpd: false + swap: false diff --git a/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2 index 5b0e7246f2..ce03b64867 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2 @@ -1,6 +1,6 @@ define hostgroup { hostgroup_name CheckSwap alias Swap-Is-Low - members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Can_Connect == true and hostvars[host].nagios_Check_Services['swap'] == true and hostvars[host].nagios_Can_Connect == true %}{{host}}{% if not loop.last %},{% endif %} {% endif %} {% endfor %} + members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Can_Connect == true and hostvars[host].nagios_Check_Services['swap'] == true and hostvars[host].nagios_Can_Connect == true %}{{host}}{% if not loop.last %}, {% endif %}{% endif %}{% endfor %} }