- changed status to resolved
Option not to send "PID changed" alerts
Issue #120
resolved
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)
-
repo owner -
reporter - edited description
-
reporter Thanks but I cannot find
{ instance, pid, ppid }
in mymonitrc
- can you show an example? -
reporter @tildeslash
-
repo owner You need to add the option to to monitrc manually, the example from previous post shows how to add the filter to "set alert" statement:
set alert email@address but not on { instance, pid, ppid }
More details in monit manual: http://mmonit.com/monit/documentation/monit.html#Setting-an-event-filter
-
reporter oh i see now. thanks so much!!
btw, www.tildeslash.com is a really good site, like the philosophy!
- Log in to comment
Adding
set alert email@address but not on { instance, pid, ppid }
at the top of yourmonitrc
should do the trick