What are your thoughts on using any kind of service monitoring to auto restart services that failed?
Is monit a good solution?
![](../../users/profiles/109832.webp)
- 259
- 6
- 17
![](../../users/profiles/37222.webp)
- 3,630
- 17
- 62
- 93
1 Answers
Well, I think in general monitoring is an extremely good idea. Auto-restart, however, needs to be implemented carefully. Depending on your application, there are likely services that need to be started up in a certain order. This logic needs to be built into your auto-restart routines so that things come up and get shut down in a healthy state. Also, included in your logic needs to be some limit on the number of times it will try and restart a service in a certain time period. If something makes a service fail in such a way that manual intervention is required, you don't want monit to be constantly trying to restart things every 10 seconds.
All in all, whether or not this is a good idea depends completely on your requirements and your environment.
![](../../users/profiles/20815.webp)
- 108,414
- 18
- 172
- 242
-
Is there anything packaged with Ubuntu server that you know of that handles auto restart of service? – Ben Aug 17 '10 at 13:52
-
@Webnet, yes monit is included in ubuntu. – EEAA Aug 17 '10 at 15:18