Monitor and restart crashed services
Hello EasyEngine Community,
I have been wondering if it's possible to add something like http://mmonit.com/monit/ or http://supervisord.org/ to monitor and restart services (nginx, hhvm, mysqld, memcache etc) when they crash, this would be super usefull and it will help making EasyEngine more fault tolerant.
There are some alternatives also : http://cr.yp.to/daemontools.html http://untroubled.org/daemontools-encore/ http://smarden.org/runit/ http://upstart.ubuntu.com/ http://www.freedesktop.org/wiki/Software/systemd/ http://freecode.com/projects/sysvinit http://skarnet.org/software/s6/ http://b0llix.net/perp/ http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh.html
(I got these from http://superuser.com/questions/683325/linux-to-monitor-a-service-and-restart-if-stopped)
This is a addition to https://github.com/rtCamp/easyengine/issues/140 (the autorestart part)
We already have monit on roadmap.
We are using monit internally. Manual steps - https://rtcamp.com/tutorials/monitoring/monit/
If you have used any other tools and finds its better than monit, please share your findings.
@rahul286 can you please post how to monitor HHVM ? I added it to monit but shows "not monitored". Process 'hhvm' status Not monitored monitoring status Not monitored data collected Tue, 28 Apr 2015 20:39:45
@doringheorghe try http://community.rtcamp.com/t/hhvm-upstart-script/3450/17
@mbtamuli how are we planning to do this? Or does Docker take care of this already?
In case of Docker, we're composing the Docker images such that there is only the primary process running on the entrypoint. That way, even if the process somehow fails, Docker will consider the container has failed and will restart the container.
Closing this issue as it requires no special handling in v4. Feel free to continue the discussion.