Step-By-Step instructions for creating alerts in GCP
Step 1: Open the GCP console click on monitoring and then on alerting.
Step 2: Click on Create Polivy and fill the necessary details.
Step 3: We have two types of metrics configuration one is builder second one is code editor (MQL or PromQL). I have selected builder. Click on select metric then Configure the resource metric.
Step 4: For example I have selected CPU utilization of VM instance as shown image below then click on apply.
Step 5: Target our VM using the filter section. Click on filter, Based on different conditions like project id, VM id or name, and zone. Then select the rolling window and rolling window function.
Step 6: Click on configure trigger and select the threshold then select the threshold position and enter the condition name.
Step 7: Click on next or notification and name. Click on notification channel and select the our channel or click on new and add our channel. Below image shows the email channel.
Step 8: Click on next or select the review alert and verify the details then click on create policy.
Step 9: Alert is created, I have configured CPU is 50 % above condition.
In above image the alert is enabled if you don’t want that this alert click on delete button and you can permanently delete the alert. If you don’t want to receive the alerts form the policy then click on enabled button it pop up disable button confirm the disable that policy is in disable position.
Step 10: Click on monitoring and verify under policies as shown image below.
How To Create Alerts In GCP ?
Monitoring through the Google Cloud Platform (GCP) enables resource monitoring in the cloud. You will be able to monitor their performance, discover problems early, and make sure everything goes according to plan. You can maintain control over your cloud services and the smooth operation of your apps with GCP monitoring.