Option not to send "PID changed" alerts

Issue #120 resolved
Michael Heuberger created an issue

This here is my current config to monit nginx. I want to be informed when the service is down after three restarts. But I do not want to be informed when the PID has changed. Looks like such an option is missing.

$ cat nginx 
check process nginx with pidfile /var/run/nginx.pid
    group www-data
    start program = "/etc/init.d/nginx start"
    stop program = "/etc/init.d/nginx stop"
    if children > 250 then restart
    if loadavg(5min) greater than 10 for 8 cycles then stop
    if 3 restarts within 3 cycles then alert
    if 3 restarts within 5 cycles then timeout
$ monit -V
This is Monit version 5.6
Copyright (C) 2001-2013 Tildeslash Ltd. All Rights Reserved.

Comments (6)

  1. Tildeslash repo owner

    Adding set alert email@address but not on { instance, pid, ppid } at the top of your monitrc should do the trick

  2. Michael Heuberger reporter

    Thanks but I cannot find { instance, pid, ppid } in my monitrc - can you show an example?

  3. Michael Heuberger reporter

    oh i see now. thanks so much!!

    btw, www.tildeslash.com is a really good site, like the philosophy!

  4. Log in to comment