Comment 7 for bug 1277655

Revision history for this message
dinexi (im-dinexi) wrote :

the config:
===
check process nginx with pidfile /var/run/nginx.pid
  group web
  start program = "/etc/init.d/nginx start"
  stop program = "/etc/init.d/nginx stop"
  if failed host 127.0.0.1 port 80 protocol http request '/robots.txt' then restart
  if 3 restarts within 5 cycles then alert
===
and the excerpt from the log:
===
[CDT May 8 02:43:36] error : monit: Error reading pid from file '/var/run/nginx.pid'
[CDT May 8 02:43:36] error : monit: Error reading pid from file '/var/run/nginx.pid'
[CDT May 8 02:43:36] info : 'php-fpm' start: /etc/init.d/php5-fpm
[CDT May 8 02:45:36] error : 'nginx' service restarted 5 times within 5 cycles(s) - alert
[CDT May 8 02:45:36] error : 'nginx' failed protocol test [HTTP] at INET[127.0.0.1:80/robots.txt] via TCP -- HTTP error: Server returned status 404
[CDT May 8 02:45:36] info : 'nginx' trying to restart
[CDT May 8 02:45:36] info : 'php-fpm' stop: /etc/init.d/php5-fpm
[CDT May 8 02:45:36] info : 'nginx' stop: /etc/init.d/nginx
[CDT May 8 02:45:36] info : 'nginx' start: /etc/init.d/nginx
> [CDT May 8 02:45:36] error : monit: Error reading pid from file '/var/run/nginx.pid'
> [CDT May 8 02:45:36] error : monit: Error reading pid from file '/var/run/nginx.pid'
===