From 77197e7b400854edfff12bad64acf3756842e098 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 2 May 2017 20:23:45 +0000 Subject: [PATCH] are we using this correctly --- inventory/group_vars/all | 2 ++ inventory/host_vars/bastion02.phx2.fedoraproject.org | 3 +++ inventory/host_vars/download-rdu01.fedoraproject.org | 3 +++ inventory/host_vars/virthost-rdu01.fedoraproject.org | 3 +++ .../templates/nagios/hostgroups/vpnclients.cfg.j2 | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/inventory/group_vars/all b/inventory/group_vars/all index 98a057a63b..5e1e96379b 100644 --- a/inventory/group_vars/all +++ b/inventory/group_vars/all @@ -267,3 +267,5 @@ nagios_Check_Services: httpd: false +nagios_NoCheck_Services: + vpn: false diff --git a/inventory/host_vars/bastion02.phx2.fedoraproject.org b/inventory/host_vars/bastion02.phx2.fedoraproject.org index b8aa7e3235..ba51c34361 100644 --- a/inventory/host_vars/bastion02.phx2.fedoraproject.org +++ b/inventory/host_vars/bastion02.phx2.fedoraproject.org @@ -14,3 +14,6 @@ vpn: true ssh_hostnames: - bastion.fedoraproject.org - bastion02.fedoraproject.org + +nagios_NoCheck_Services: + vpn:true diff --git a/inventory/host_vars/download-rdu01.fedoraproject.org b/inventory/host_vars/download-rdu01.fedoraproject.org index 792376b30a..d6218d696e 100644 --- a/inventory/host_vars/download-rdu01.fedoraproject.org +++ b/inventory/host_vars/download-rdu01.fedoraproject.org @@ -11,3 +11,6 @@ eth0_ip: 204.85.14.1 eth0_nm: 255.255.255.192 eth1_ip: 172.31.1.1 eth1_nm: 255.255.255.0 + +nagios_NoCheck_Services: + vpn:true diff --git a/inventory/host_vars/virthost-rdu01.fedoraproject.org b/inventory/host_vars/virthost-rdu01.fedoraproject.org index ce7d73c0d0..8b0bf26b30 100644 --- a/inventory/host_vars/virthost-rdu01.fedoraproject.org +++ b/inventory/host_vars/virthost-rdu01.fedoraproject.org @@ -9,3 +9,6 @@ postfix_group: vpn br0_ip: 204.85.14.4 br0_nm: 255.255.255.192 vpn: true + +nagios_NoCheck_Services: + vpn:true diff --git a/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 index 3225099fc3..6e4b7755f1 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 @@ -3,6 +3,6 @@ define hostgroup { hostgroup_name vpnclients alias vpnclients - members {% for host in groups['all'] %}{% if hostvars[host].vpn %}{{host}},{% endif %} {% endfor %} + members {% for host in groups['all'] %}{% if hostvars[host].vpn and (hostvars[host].NoCheckServices['vpn'] == true) %}{{host}},{% endif %} {% endfor %} }