Google Associate Cloud Engineer Question 280
Select 3Google Cloud PlatformYou are managing a fleet of virtual machines on Google Cloud Platform and want to ensure that you are alerted whenever the CPU utilization of any VM exceeds 80% for more than 5 minutes. Which steps should you take to correctly set up this alert in Google Cloud Monitoring?
- A
Create an alert policy and select 'VM Instance' as the resource type, then set the condition to trigger when 'CPU utilization' metric exceeds 80%.
- B
Set the aggregation period to 5 minutes and ensure the condition duration is set to 5 minutes.
- C
Choose 'Send email notification' as the notification channel to receive alerts.
- D
Use 'Log-based metrics' to create a custom metric for CPU utilization.
- E
Enable 'Cloud Logging' to store logs for the VM instances.
Show answer and explanation
Correct answers: A, B, C
Explanation
To set up an alert for high CPU utilization, you need to create an alert policy with appropriate conditions and notification channels. Selecting the correct metric and resource type, configuring the condition duration and aggregation period, and setting a notification method are essential steps.
- A. Correct.
Creating an alert policy with the VM Instance resource type and setting the condition for CPU utilization is correct. This configures Cloud Monitoring to watch the CPU utilization metric.
- B. Correct.
Setting the aggregation period to 5 minutes and the condition duration to 5 minutes ensures that the alert triggers after the condition persists for the specified duration.
- C. Correct.
Choosing the 'Send email notification' channel is necessary to ensure you receive notifications when the alert condition is met.
- D. Incorrect.
Log-based metrics are not required for monitoring CPU utilization with Cloud Monitoring as it provides built-in metrics for this purpose.
- E. Incorrect.
Enabling Cloud Logging is unrelated to setting up alerts for CPU utilization metrics, although it may be useful for other purposes.