Will hestiacp automatically restart services after they go down?
On vestacp, from time to time mysql is down but didnt restart itself. I need to install monit to make it autorestart.
So, the question is will hestiacp autorestart service if one of them is down?
You supposed to check why it stopped.
Better dont make any scripts for that to auto-restart. Instead you should rectify the issue, before it spoil your server.
So, your question supposed to be āGet notified while the service stoppedā.
Should not be as āFeature to auto-restart of mysql while it down with reasonsā.
To get alerted for mysql service, currently no feature yet on hestia & many branded leading panels also will not let us to have this feature by default [alerting only]. The reason is the alert feature is not guaranteed.
Let say, if server down, email service down etc.,
I set a 3rd party service, which will just keep monitoring my essential ports & alert me if it down.
in your case, you have to find what is that break point, which is stopping your mysql.
Also set some scripts to ALERT you only. Dont auto-restart. As SysAdmin people, they knows well why im saying this.
There is no need for monit or other additional programs to restart failed services, systemd has this functionality built-insee manual
Also mysql service is configured to restart itsef āon-abortā ( cat /etc/systemd/system/mysqld.service ) so any workarounds you had to configure previously are probably not needed anymore
# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s
But If you still want to change the restart condition to āon-failureā or āalwaysā , extend the unit file :