When you monitor a process with Monit by its pid, like :
check process blop with pidfile /.../blop.pid
start program = "..."
stop program = "..."
you get an alert when the pidfile is changed.
How do you disable this alert? For example, if you only want to know when the process fails to be restarted.
You can disable this alert by setting up a local alert statement. This is thoroughly documented here: http://mmonit.com/monit/documentation/monit.html#setting_a_local_alert_statement
This should do it:
Another option is disabling alerts on
This way you will not receive alerts for monit restart (
instance
) nor alerts for all services start/stop/restart (action
).Full list of possible filters for this can be found at: https://mmonit.com/monit/documentation/monit.html#Setting-an-event-filter (I think this list should also apply to the alerts attached to process checks of another answer for this question).