From 28db0aa10f806f24fa4478eed9e72ad7af74a30b Mon Sep 17 00:00:00 2001 From: Mark O Brien Date: Mon, 16 May 2022 13:59:32 +0100 Subject: [PATCH] update nagios checks for http-accounts for ocp4 proxies only Signed-off-by: Mark O Brien --- inventory/inventory | 6 ++++++ .../templates/nagios/hostgroups/all-external.cfg.j2 | 11 +++++++++-- .../templates/nagios/services/websites.cfg.j2 | 6 +++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/inventory/inventory b/inventory/inventory index 6654debfef..3c5622ad42 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -534,6 +534,12 @@ proxy40.fedoraproject.org proxy101.iad2.fedoraproject.org proxy110.iad2.fedoraproject.org +[proxies_ocp4] +proxy01.iad2.fedoraproject.org +proxy10.iad2.fedoraproject.org + + + [proxies:children] proxies_external proxies_internal diff --git a/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2 index a1774921b0..dc8255b610 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2 @@ -10,7 +10,7 @@ define hostgroup { alias SMTP MailMan Servers members {% for host in groups["smtp_mm"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %} -} +} define hostgroup { hostgroup_name proxies @@ -19,6 +19,13 @@ define hostgroup { } +define hostgroup { + hostgroup_name ocp_proxies + alias OCP Web Servers + members {% for host in groups["proxies_ocp4"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %} + +} + define hostgroup { hostgroup_name unbound alias External DNS @@ -31,7 +38,7 @@ define hostgroup { define hostgroup{ hostgroup_name {{ key }} alias {{ key }} - members {% for host in groups[key]|sort %}{% if hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %} + members {% for host in groups[key]|sort %}{% if hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %} } {% endif %} diff --git a/roles/nagios_server/templates/nagios/services/websites.cfg.j2 b/roles/nagios_server/templates/nagios/services/websites.cfg.j2 index d918d0fa3f..536c57a53c 100644 --- a/roles/nagios_server/templates/nagios/services/websites.cfg.j2 +++ b/roles/nagios_server/templates/nagios/services/websites.cfg.j2 @@ -60,7 +60,7 @@ define service { } define service { - hostgroup_name proxies + hostgroup_name ocp_proxies service_description http-accounts check_command check_website_ssl!accounts.fedoraproject.org!/healthz/ready!OK use websitetemplate @@ -174,7 +174,7 @@ define service { {% if vars['nagios_location'] == 'iad2_internal' %} ## -## Other Frontend Websites +## Other Frontend Websites define service { hostgroup_name badges_web @@ -284,7 +284,7 @@ define service { } -## Internal services +## Internal services define service { hostgroup_name value