Auto Restart Services if Failed

Posted February 13, 2014 6.4k views
hi my system is centos 6.5 i need to know if there's script to automatic restart the services if failed and it announce to admin by using email. thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers
Hi Agus,

You can try this for the automatic restart of services:

To do email check this one if it helps:
by O.S Tezer
In this article, we learn how to simply send e-mail alerts on a VPS and talk about various triggers that can be set to establish better overall security and to maintain a smooth running system. We go through the basics of e-mail, the necessary applications, along with examples of various e-mail alert triggers.
Have you looked at Monit?