I'm looking for a way to have monit only send out an alert when a particular process goes down. For example:
check process apache
with pidfile /var/run/httpd.pid
group www
start program = "/usr/sbin/apachectl start"
stop program = "/usr/sbin/apachectl stop"
alert operations@example.com with reminder 5
With that configuration apache will be restarted with the process disappears. Rather than have that happen I'd like to to stay down until someone can manually intervene.
For those that are curious as to why:
Our production environment uses monit for controlling applications. Our non-production environments do not. This led to a problem because our developers changed the start method for a particular application. It made it all the way through our non-production environments before it got to production and monit ended up bringing down the application because it wasn't caught in pre-production.
I want to have monit in place on non-production so we can catch failures like this, but since it isn't mission critical we don't need to have the services automatically restarted.