File: //etc/monit.d/lease-back.com_httpd.conf
check file lease-back.com_httpd with path /home/kusanagi/lease-back.com/log/httpd/access.log
start program = "/bin/kusanagi restart"
stop program = "/bin/systemctl stop httpd"
depends on httpd
if match '"(GET|POST) /.* HTTP/.*" 5[0-9][0-9] [0-9]+ ' for 2 cycle then start
if 5 restarts within 5 cycles then alert
if 5 restarts within 5 cycles then unmonitor
group httpd
check file lease-back.com_httpd_ssl with path /home/kusanagi/lease-back.com/log/httpd/ssl_access.log
start program = "/bin/kusanagi restart"
stop program = "/bin/systemctl stop httpd"
depends on httpd
if match '"(GET|POST) /.* HTTP/.*" 5[0-9][0-9] [0-9]+ ' for 2 cycle then start
if 5 restarts within 5 cycles then alert
if 5 restarts within 5 cycles then unmonitor
group httpd