Alert notification when server is down

August 16, 2016 12.5k views
Nginx Apache Ubuntu 16.04

Today our apache died on the droplet. Just a couple of hours we found out :(

It would nice to have a feature at Digital Ocean to get notified in case the websites are not loading anymore (bad gateway).

A notification by email would be sufficient. Bonus could be SMS and phone ring.

Thanks in advance.

4 Answers

if it is helpful....
I have a script that will check MySQL and Apache (or other services) to see if they are up, and restart them if they are not:

  • That looks interesting. Will probably try it out. So the script runs on the same server? Are you using it yourself, is it reliable? Thanks.

    • I use it on every droplet I have.

      There was an issue where if a mysql server was rebooted several times in a row, I would have to manually reboot the server, but I have not ran into that issue in several months…I do not know if this is due to Ubuntu updates fixing something, or if I have sufficiently hardened my servers (which I have been working on) .

      Either way, it still sends me emails letting me know what is happening with my servers, and attempts to restart services that are stopped, which is exactly what I wanted.

      On another note: I did a project earlier this year where someone wanted SMS and email sent.
      Long story short, I finagled Google Voice number to send him a text when his server stopped.

      It was not difficult…Google Voice can send SMS, and can also send text by email…so in effect, it is possible to use the above script to send an SMS if you create a Google Voice account and set up the send-to link properly…but that is another post..

You can suggest new features at In the mean time, you could use Pingdom or one of the other thousands of monitoring services out there.

For my servers, I use icinga.
I can configure to tests my server (not only the uptime but every aspect of it).
And with the app anag on my android phone, I get all the stats of my servers.
When I get an alert, icinga send me an email, and the app anag start buzzing until I shut it off or I fix the problem.

I use dynatrace which is more advanced/

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!