Server Type - VPS
OS - Centos
Panel - cpanel
Root access - Yes i have.
Sometime due to load or some other issues my vps goes down. Then i always need to perform a restart by login at my host's server control panel.
When i click on restart tab after few minutes my server come back online.
But i want to do that pragmatically or with some kind of script.
I can detect when my server gets down. I have my own server monitoring system but its not possible for me to be available online every time when my server goes down. So i bear loss at that time.
That is why i am looking for making a script by which i can remotely send a reboot/restart request automatically to my down VPS. Same way like my host's server control panel does.
But i am not getting any clue about how to do that?
Is there any hidden kind of access that you perform to reboot/restart to the server?
May i know if is there any kind of API to do so?
Any technical advice will be an advantage for me.
Thank you,