Question

How to setup Monitoring and Alerting to notify when droplet is down/offline?

Posted May 15, 2021 87 views
NginxApacheMonitoringUbuntu 16.04Ubuntu 18.04

I’m trying to setup alert policies to notify when one of my droplets is down.

Use case

  • I noticed that my app running on a droplet was crashing at times and I received no notification about this.

Steps Taken

  • I have installed the Digital Ocean Monitoring Agent in the droplet.
  • Setup alert policy on this droplet with CPU is below 0.01% metric.

Issue

  • No alerts are triggered when I manually toggle off the droplet.

Questions

  • How can I fix this setup to trigger alert when the droplet is down?
  • Is there another simpler solution for setting up such alerts which I’m overlooking?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @kshitij10496,

Unfortunately, Digital Ocean Monitoring Agent is installed on the Droplet so when the droplet is down, it can’t alert you. What you could use Pi a service like Pingdom or one of the other #rd party monitoring services out there. Basically, these services see if your Drople is responding or not and when it’s not alert you by sending out e-mails.

Now, having said that, in your use-case scenario, you mentioned your app is crashing at times, is it due to your droplet failing and shutting down or due to something else? If it’s the latter, you can try using services like supervisord which restart other services if they are not running. Here is a tutorial which you can see on how Supervisor is working:

https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps

Regards,
KFSys

Here's our tutorial on installing and managing Supervisor on Ubuntu and Debian.