gpt4 book ai didi

php-fpm 的监控配置

转载 作者:可可西里 更新时间:2023-10-31 23:03:39 25 4
gpt4 key购买 nike

我正在努力寻找适用于 php-fpm 的监视器配置。

这是我试过的:

### Monitoring php-fpm: the parent process.
check process php-fpm with pidfile /var/run/php-fpm/php-fpm.pid
group phpcgi # phpcgi group
start program = "/etc/init.d/php-fpm start"
stop program = "/etc/init.d/php-fpm stop"
## Test the UNIX socket. Restart if down.
if failed unixsocket /var/run/php-fpm.sock then restart
## If the restarts attempts fail then alert.
if 3 restarts within 5 cycles then timeout

但是失败了,因为没有php-fpm.sock (Centos 6)

最佳答案

对于在 Centos 6 上遇到此问题的其他人,php-fpm 套接字位于 /var/run/php-fpm/php-fpm.sock

因此最终的配置应该是这样的:

check process php-fpm with pidfile /var/run/php-fpm/php-fpm.pid
group phpcgi #change accordingly
start program = "/etc/init.d/php-fpm start"
stop program = "/etc/init.d/php-fpm stop"
if failed unixsocket /var/run/php-fpm/php-fpm.sock then restart
if 3 restarts within 5 cycles then timeout

关于php-fpm 的监控配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7846847/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com