Complete the code to specify the metric type for the alerting policy.
metric_type: "[1]"
The metric_type field must specify the exact metric to monitor. Here, CPU utilization for compute instances is a common choice.
Complete the code to set the threshold value for the alert condition.
threshold_value: [1]The threshold value defines when the alert triggers. For CPU utilization, 0.8 means 80% usage.
Fix the error in the alerting policy condition operator.
comparison: "[1]"
The operator COMPARISON_GT triggers the alert when the metric exceeds the threshold.
Fill both blanks to define the alerting policy's notification channel and display name.
notification_channels: - "[1]" display_name: "[2]"
The notification_channels field requires the full resource name of the channel. The display_name is a friendly name for the alert.
Fill all three blanks to complete the alerting policy condition with metric, duration, and trigger count.
condition: filter: "metric.type = '[1]'" duration: "[2]" trigger: count: [3]
The filter specifies the metric to monitor. Duration is how long the condition must hold. Trigger count is how many times the condition must be met.