Google Associate Cloud Engineer Question 30
Select 2Google Cloud PlatformA company is using Google Cloud's operations suite to monitor their cloud resources. They want to set up a system where they receive alerts when the CPU usage of a VM instance exceeds 80% for more than 5 minutes. Which of the following steps should they take to achieve this?
- A
Create an uptime check for the VM instance in Cloud Monitoring.
- B
Define an alerting policy in Cloud Monitoring with a condition for CPU usage.
- C
Set up a notification channel in Cloud Monitoring for email alerts.
- D
Deploy a Cloud Function to automatically restart the VM instance when the alert is triggered.
Show answer and explanation
Correct answers: B, C
Explanation
To monitor CPU usage and receive alerts, you need to define an alerting policy in Cloud Monitoring that specifies the metric (CPU usage) and condition (exceeds 80% for more than 5 minutes). Additionally, a notification channel must be configured to ensure alerts are sent to the appropriate recipients. Uptime checks are irrelevant for this scenario as they relate to service availability rather than resource utilization. While a Cloud Function could be used to automate responses to alerts, it is not required for setting up the alert itself.
- A. Incorrect.
An uptime check is used to verify the availability of a service, not to monitor resource usage like CPU.
- B. Correct.
Defining an alerting policy with a condition on CPU usage is necessary to trigger alerts based on specific metrics.
- C. Correct.
Setting up a notification channel is essential to receive alerts when the specified condition is met.
- D. Incorrect.
Deploying a Cloud Function to restart the VM is not necessary for the alerting setup itself, although it could be used as a response to an alert.