monit: add option to check http connections for various services
This commit is contained in:
parent
1cb94a0d32
commit
8afbfeb1e7
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue