Restart service on no linux logs output


Sometimes I have apps that suddenly stop working, however, they don’t have PID output or I can’t start them via systemd or upstart due to convoluted requirements. Other times the app is on but it stops processing incoming queues due to various reasons. I need to make sure i have a mechanism in place to Restart service as needed. I’m going to describe how you can check for Linux logs output and if there is no log for X seconds then we restart the app! we check the log every X seconds and if in the past X seconds there is no movement we perform X function.

Restart service script

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *