Instead:
if failed unixsocket /var/run/php-fpm.sock then restart
you can try:
if failed port 9000 type TCP then restart
It does not require editing the configuration of lighttpd / nginx, as in the case of location /ping .
My /etc/monit/conf.d/php-fpm.conf on Ubuntu looks like this:
check process php-fpm with pidfile /var/run/php5-fpm.pid stop program = "/sbin/start-stop-daemon --stop --pidfile /var/run/php5-fpm.pid" start program = "/sbin/start-stop-daemon --start --pidfile /var/run/php5-fpm.pid --exec /usr/sbin/php5-fpm" if failed port 9000 type TCP then restart
suside
source share