How to check website uptime using Google Cloud Monitoring. Using Google cloud you can create uptime checks which sends requests to a resource in certain intervals to check if the resource responds.
With Google cloud’s uptime check you can check a URL, availability of a VM instance, App Engine or AWS Load Balancer.
In this guide you are going to learn how to configure uptime checks and also configure an alert policy which sends notification to your email address or your phone number.
A Google Cloud Account with billing activated.
Create a New Uptime Check
Go to your Google Cloud console and navigate to Operations >> Monitoring >> Uptime Checks. If you are using this for the first time you need to choose your project and automatically the required monitoring APIs will be enabled and workspace will be created for you.
Once the workspace is created you can start creating uptime checks.
- Click Create Uptime Check
- A popup window will appear where you can provide all the details.
- In the title you can provide a title to identify your check.
- In Check Type you can choose from HTTP, HTTPS or TCP. Here we will choose HTTPS if we use HTTPS.
- In the Resource Type you can choose from URL, App Engine, Elastic Load Balancer or Instance. Here we will choose URL and enter the domain name in Hostname.
- If you choose URL you need to enter your domain name in the Hostname field or which ever you use to connect to the resource.
- If you choose App Engine you need to select a service.
- If you choose Load Balancer you need to choose the Load Balancer.
- If you choose Instance you need to select the instance that needs to be monitored.
- In Check every you can choose from 1 minute, 5 minutes, 10 minutes or 15 minutes.
Click Test to check the connection.
Once the test is passed you will receive a 200 response.
Click Save to create the uptime check.
Create Alert Policy
Once you have created an uptime check you will be prompted to create alert policy with the uptime check.
Enter name for the Alert Policy.
Your Uptime check will be configured by default, if not you can choose the uptime check created before.
In the Notification Channels, click Manage Notification Channels
Here you can add your email and phone number and choose them in the Alert Policy page.
Finally in the Steps to Fix the Issue you can enter the description of the instructions to follow.
Alright done. Now you have created an uptime check and configured an alert policy which notified if there is any downtime.
Now you have learned how to create and configure uptime check in Google cloud and setup an alert policy to notify if the response is not ok.
Thanks for your time. If you face any problem or any feedback, please leave a comment below.