From 8afbfeb1e79f42b55c7037ef46f1b36a79dc7fc6 Mon Sep 17 00:00:00 2001 From: Rico Ullmann Date: Tue, 4 Jan 2022 11:59:44 +0100 Subject: [PATCH] monit: add option to check http connections for various services --- bundles/monit/files/monitrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bundles/monit/files/monitrc b/bundles/monit/files/monitrc index 10058fe..2682ad1 100644 --- a/bundles/monit/files/monitrc +++ b/bundles/monit/files/monitrc @@ -51,5 +51,16 @@ check process ${service} matching "${options['bin']}" % for port,port_options in options.get('ports', {}).items(): if failed port ${port} protocol ${port_options['protocol']} for ${port_options.get('cycles', '5')} cycles then restart % endfor +% for domain,http_options in options.get('http', {}).items(): + if failed host ${domain} +% if http_options['scheme'] == 'https': + port 443 + protocol https +% else: + port 80 + protocol http +% endif + then restart +% endfor % endfor