monit configuration for php-fpm
Posted
by
Adam Jimenez
on Server Fault
See other posts from Server Fault
or by Adam Jimenez
Published on 2011-10-19T08:29:23Z
Indexed on
2012/06/12
16:42 UTC
Read the original article
Hit count: 986
I'm struggling to find a monit config for php-fpm that works.
This is what I've tried:
### 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
depends on php-fpm_bin
depends on php-fpm_init
## Test the php-fpm binary.
check file php-fpm_bin with path /usr/sbin/php-fpm
group phpcgi
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
## Test the init scripts.
check file php-fpm_init with path /etc/init.d/php-fpm
group phpcgi
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
But it fails because there is no php-fpm.sock (Centos 6)
© Server Fault or respective owner