— Cristian O. Balan (@oviliz) November 6, 2018
I found that Azure has a hard time to monitor disk usage on a Linux box. There are ways, but it seems to be too complicated to achieve such a basic thing. So I came up with the following script I call in a cron job as needed.
Make sure to adjust the THRESHOLD and emails as needed. Ideally, you’ll configure a mail server (e.g. Postfix) with SMTP credentials (e.g. SendGrid) and proper SPF records to make sure your emails don’t end up in Junk and miss them.
There are plenty of proper monitoring solutions and I always love those that give you a free tier such as HetrixTools Uptime Monitors or Datadog. However, not always these can be used.