- changed status to closed
M/Monit should allow a method to 'gracefully' shutdown hosts
Issue #415
closed
I'm using M/Monit in a dynamic environment where we scale up or scale down depending on traffic.
When we scale up and then down, M/Monit starts alerting about the missing servers, even though we have done it on purpose.
There needs to be a graceful way to "ignore" certain servers, or set them as "Dynamic" so that M/Monit does not complain when they go away, and instead, simply removes them from monitoring.
Maybe there needs to be some coordination between M/Monit and our systems prior to shutdown of each of these hosts.
This is critical in cloud environments.
Comments (3)
-
repo owner -
repo owner - changed version to 5.17.x
-
repo owner - changed version to 5.17.0
- Log in to comment
You just need to stop monit gracefully on the host which is to be stopped - monit then sends a "stop" event which switches the state to "stopped". If you just kill the host, M/Monit will send a heartbeat event.
If you need to cleanup hosts from M/Monit which are no longer used, you can use the HTTP-API to purge inactive entries ... see the "delete" method: https://mmonit.com/documentation/http-api/Methods/Admin_Hosts