From debd3c5b7e6bf831661653a00add7051be3dab5c Mon Sep 17 00:00:00 2001 From: Silvie Chlupova Date: Thu, 20 Jan 2022 15:25:51 +0100 Subject: [PATCH] copr: define new command for nagios We need to use --ssl and also -f follow --- roles/nagios_server/files/nagios/commands/httpd.cfg | 5 +++++ .../nagios_server/templates/nagios/services/websites.cfg.j2 | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/nagios_server/files/nagios/commands/httpd.cfg b/roles/nagios_server/files/nagios/commands/httpd.cfg index 21843f4be9..f29f0a0e56 100644 --- a/roles/nagios_server/files/nagios/commands/httpd.cfg +++ b/roles/nagios_server/files/nagios/commands/httpd.cfg @@ -51,6 +51,11 @@ define command{ command_line $USER1$/check_http -w 30 -c 40 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow } +define command{ + command_name check_website_follow_ssl + command_line $USER1$/check_http -w 30 -c 40 --ssl --sni -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow +} + define command{ command_name check_website_ppc command_line $USER1$/check_http -w 300 -c 400 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" diff --git a/roles/nagios_server/templates/nagios/services/websites.cfg.j2 b/roles/nagios_server/templates/nagios/services/websites.cfg.j2 index 57148ecdf7..3b05df92e4 100644 --- a/roles/nagios_server/templates/nagios/services/websites.cfg.j2 +++ b/roles/nagios_server/templates/nagios/services/websites.cfg.j2 @@ -355,7 +355,7 @@ define service { define service { hostgroup_name proxies service_description http-download.copr.fedorainfracloud.org - check_command check_website_ssl!download.copr.fedorainfracloud.org!Index of / + check_command check_website_follow_ssl!download.copr.fedorainfracloud.org!Index of / max_check_attempts 8 use websitetemplate }