title: Monit configuration for php-fpm
body: <p>I'm struggling to find a monit config for php-fpm that works.</p>
  
  <p>This is what I've tried:</p>
  
  <pre><code>### 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
  </code></pre>
  
  <p>But it fails because there is no <strong>php-fpm.sock</strong> (Centos 6)</p>