monit: add option to check http connections for various services

This commit is contained in:
Rico 2022-01-04 11:59:44 +01:00
parent 1cb94a0d32
commit 8afbfeb1e7
Signed by: stillbeben
GPG Key ID: AE1066B5BD0B5041
1 changed files with 11 additions and 0 deletions

View File

@ -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