我正在尝试设置 Monit,以便它可以跟踪域,以防 PHP 崩溃。例子:
check file php7.3-fpm-pidfile with path /var/run/php/php7.3-fpm.pid
start program = "/usr/sbin/service php7.3-fpm start" with timeout 60 seconds
stop program = "/usr/sbin/service php7.3-fpm stop"
if does not exist then restart
if failed unixsocket /run/php/php7.3-fpm-domain.co.uk.sock then restart
if failed unixsocket /run/php/php7.3-fpm-domain2.co.uk.sock then restart
if failed unixsocket /run/php/php7.3-fpm-domain3.co.uk.sock then restart
作为一个简单的测试:
check file php7.3-fpm-pidfile with path /var/run/php/php7.3-fpm.pid
start program = "/usr/sbin/service php7.3-fpm start" with timeout 60 seconds
stop program = "/usr/sbin/service php7.3-fpm stop"
if does not exist then restart
if failed unixsocket /run/php/php7.3-fpm-domain.co.uk.sock then restart
然而,重新启动 Monit 时,最终失败:
/etc/monit/conf-enabled/php-fpm:14: 语法错误 'unixsocket'
我使用的是Monit 5.31.0,它应该足够新才能有这个unixsocket
选项。我缺少什么?