-1

I'm running a Python web-scraper on my friend's server in a VM (windows server and windows OS). Is there any easy way for me to get an email or other remote alert if the server loses power/is restarted, VM goes down, windows decides it's time for an update, etc?

I already use smtp to get emails when the script crashes / gets blocked, I just don't know how or if there is a way to detect the server going down in order to send one last email.

1 Answers1

0

The only ways to detect downtime for a server is to either have regular heartbeat messages, or to ping it from an outside device.

If you have an HTTP server listening on that server, you can use a service such as updown in order to get email alerts when it goes down. There are also Android applications that can do this for you.

If your script is supposed to run all the time, you can arrange it as a service that gets auto-started after restarts and/or updates. Unless you shut down the server manually, it is not very likely to go down completely.

Leo
  • 1,273
  • 9
  • 14