This is the story about wanting to add a Azure health check to geircode.no, but ending up with sending SMS alerts via AWS Route 53 health check.
Suddenly my website did not respond anymore and I did not know that had happened. So this article is the story about how I tried to create free health checks in Azure to geircode.no, but ended up with throwing money on AWS using AWS Route 53 health check to send SMS alerts.
- Add some sort of email/SMS alert when geircode.no becomes unresponsive or is not 200 OK anymore
This seems pretty straight forward.
Creating the health check via Application Insights:
Great! A new Application Insights resource in Azure:
Now I need to add the actual health check:
You can set who will get the alert if the website goes down when clicking on the “Alerts”:
But an email alert is not enough. How do I get Azure to send me the alert on SMS?
Hmm, AWS got SMS sending capabilities built in with CloudWatch, but Azure does not seem to have this functionality. A fast google search will show a lot of links pointing to a Twilio integration. Ok, do I need to make another service that calls Twilio? And this service needs to listen a webhook from this Azure health check? That’s not very user friendly, and Twilio is not free. (Neither is AWS though).
Or perhaps I need(want) to create an App that can receive Push notifications? Since I don’t want to create my own App, someone has already done this: https://pushed.co/quick-start-guide
But I still need to create the service that responds to the webhook from Azure and then talks to the Pushed API that again pushes the notification to my mobile. Almost like a sms.
The workload for completing the goals of this article is increasing! Perhaps I should just ‘crawl to the cross’ as we say in Norway, and throw some money at AWS😊
So, that’s what I did and added a health check to “geircode.no” in Route53:
In order to add SMS, go here: https://console.aws.amazon.com/sns/v2/home
Click on “Create topic” and create a topic:
Click on “Create subscription”:
If you created the Route53 Health check first, go back and edit the alert and update the “Notification target”:
Now it’s all set up. AWS periodically checks “geircode.no” if it’s up and sends SMS if it not. As with all cloud billing, it will be interesting to see how much this will cost.
Success! Too bad Azure does not have this flexibility.