Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In general, there should be such tools at the hypervisor level. However, they are unlikely to be available from inside the vps container. I have not met hosters that would provide an API to this mechanism on the hypervisor. Probably not for security reasons.
If you have access to a hypervisor (for example, you rent a physical server where you deployed a VPS), then you need to know which hypervisor you have.
And so you can monitor individual services on the VPS and restart them as needed using self-written scripts or specials. Software (for example, Zabbix). Of course, if the entire VPS "dies", this will not save the situation.
Your approach is on the wrong side. Failures should be monitored and the causes of the failure eliminated.
If a failure is understood as kernel panic, then you can add the line to /etc/sysctl.conf:
kernel.panic = 3
then after kernel panic the system will automatically reboot after 3 seconds.
In other cases, it is necessary to monitor each service / daemon separately and already hang some handler on this monitoring.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question