monit status
Status not available – monit http interface is not enabled, please add the ‘set httpd’ statement
vim /etc/monit/monitrc
set httpd port 2812 and
use address 0.0.0.0
allow 0.0.0.0/0.0.0.0
monit -t
service monit reload
monit status
Status not available – monit http interface is not enabled, please add the ‘set httpd’ statement
vim /etc/monit/monitrc
set httpd port 2812 and
use address 0.0.0.0
allow 0.0.0.0/0.0.0.0
monit -t
service monit reload
check host nginx with address 127.0.0.1
start program = "/bin/systemctl start nginx"
stop program = "/bin/systemctl stop nginx"
if failed port 80 then restart
if 5 restarts within 5 cycles then timeout
grep -r "listen =" /etc/php/*/fpm/pool.d/*
find /run -iname php*.pid
vi /etc/monit/conf.d/php-fpm
check process php-fpm with pidfile /run/php/7/php-fpm.pid
start program = "/usr/sbin/service php7-fpm start" with timeout 60 seconds
stop program = "/usr/sbin/service php7-fpm stop"
if failed unixsocket /var/run/php7-fpm.sock then restart
monit -t
service monit reload