0
0
GCPcloud~10 mins

Alerting policies in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the metric type for the alerting policy.

GCP
metric_type: "[1]"
Drag options to blanks, or click blank then click option'
Acustom.googleapis.com/my_metric
Bstorage.googleapis.com/bucket/size
Clogging.googleapis.com/log_entry_count
Dcompute.googleapis.com/instance/cpu/utilization
Attempts:
3 left
💡 Hint
Common Mistakes
Using a custom metric name when a standard metric is required.
2fill in blank
medium

Complete the code to set the threshold value for the alert condition.

GCP
threshold_value: [1]
Drag options to blanks, or click blank then click option'
A1.5
B0.5
C0.8
D2.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using values greater than 1 for utilization thresholds.
3fill in blank
hard

Fix the error in the alerting policy condition operator.

GCP
comparison: "[1]"
Drag options to blanks, or click blank then click option'
ACOMPARISON_NE
BCOMPARISON_GT
CCOMPARISON_EQ
DCOMPARISON_LT
Attempts:
3 left
💡 Hint
Common Mistakes
Using COMPARISON_LT when the alert should trigger on high values.
4fill in blank
hard

Fill both blanks to define the alerting policy's notification channel and display name.

GCP
notification_channels:
  - "[1]"
display_name: "[2]"
Drag options to blanks, or click blank then click option'
Aprojects/my-project/notificationChannels/1234567890
BHigh CPU Alert
Cprojects/my-project/notificationChannels/0987654321
DDisk Space Alert
Attempts:
3 left
💡 Hint
Common Mistakes
Using display names in place of notification channel resource names.
5fill in blank
hard

Fill all three blanks to complete the alerting policy condition with metric, duration, and trigger count.

GCP
condition:
  filter: "metric.type = '[1]'"
  duration: "[2]"
  trigger:
    count: [3]
Drag options to blanks, or click blank then click option'
Acompute.googleapis.com/instance/cpu/utilization
B300s
C1
Dstorage.googleapis.com/bucket/size
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong metric names or incorrect duration format.