Bird
Raised Fist0
GCPcloud~20 mins

Alerting policies in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Alerting Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
Understanding Alerting Policy Behavior

You have created an alerting policy in Google Cloud Monitoring that triggers when CPU usage exceeds 80% for 5 minutes. What will happen if the CPU usage spikes to 85% for 3 minutes and then drops back to 50%?

AThe alert will not trigger because the CPU usage did not exceed 80% for the full 5 minutes.
BThe alert will trigger after the CPU usage drops back below 80%.
CThe alert will trigger immediately when CPU usage hits 85%.
DThe alert will trigger only if CPU usage stays above 90% for 5 minutes.
Attempts:
2 left
💡 Hint

Think about how the duration condition affects alert triggering.

❓ Configuration
intermediate
2:00remaining
Correct Configuration of Notification Channels

You want to receive email notifications when an alerting policy triggers. Which configuration step is necessary to ensure emails are sent?

ACreate a Pub/Sub topic and subscribe your email to it.
BAdd your email address as a notification channel and link it to the alerting policy.
CEnable Stackdriver Logging to forward alerts to your email.
DSet up a Cloud Function to send emails when alerts occur.
Attempts:
2 left
💡 Hint

Consider the built-in ways Google Cloud Monitoring sends notifications.

❓ Architecture
advanced
3:00remaining
Designing a Multi-Region Alerting Strategy

You manage a multi-region application and want to create alerting policies that notify you only if an issue affects more than one region simultaneously. Which approach best achieves this?

ACreate separate alerting policies per region and combine notifications manually.
BSet up alerting policies per region and configure a Cloud Function to check if multiple alerts are active before sending notifications.
CUse a single alerting policy with a metric that aggregates data across all regions and triggers only if multiple regions report issues.
DConfigure alerting policies with a short duration threshold to catch issues quickly in each region.
Attempts:
2 left
💡 Hint

Think about how to aggregate metrics across regions for alerting.

❓ security
advanced
2:00remaining
Securing Alerting Policies Access

Which IAM role should you assign to a team member who needs to create and edit alerting policies but should not have permission to delete notification channels?

AMonitoring Editor (roles/monitoring.editor)
BProject Owner (roles/owner)
CMonitoring Viewer (roles/monitoring.viewer)
DMonitoring Admin (roles/monitoring.admin)
Attempts:
2 left
💡 Hint

Consider the permissions included in each role.

✅ Best Practice
expert
3:00remaining
Optimizing Alerting Policies to Reduce Noise

You notice your team receives too many alert notifications for transient issues that resolve quickly. Which configuration change best reduces alert noise without missing critical incidents?

ADisable alerting policies during off-hours to avoid unnecessary alerts.
BLower the threshold to catch issues earlier and resolve them faster.
CRemove all notification channels except email to reduce alert volume.
DIncrease the alerting policy's condition duration to require the issue to persist longer before triggering.
Attempts:
2 left
💡 Hint

Think about how alert duration affects alert triggering.

Practice

(1/5)
1. What is the main purpose of an alerting policy in Google Cloud Monitoring?
easy
A. To watch cloud metrics and notify when something needs attention
B. To deploy virtual machines automatically
C. To store data backups securely
D. To manage user access permissions

Solution

  1. Step 1: Understand the role of alerting policies

    An alerting policy monitors cloud metrics continuously to detect issues.
  2. Step 2: Identify the main function

    When a condition is met, it sends notifications to inform the team.
  3. Final Answer:

    To watch cloud metrics and notify when something needs attention -> Option A
  4. Quick Check:

    Alerting policy = notify on metric issues [OK]
Hint: Alerting policies notify on metric changes [OK]
Common Mistakes:
  • Confusing alerting with deployment
  • Thinking alerting manages backups
  • Mixing alerting with access control
2. Which of the following is the correct way to specify a notification channel in a Google Cloud alerting policy configuration?
easy
A. "channels": "my-project/notification/12345"
B. "notifyChannel": "12345"
C. "notification": "channel-12345"
D. "notificationChannels": ["projects/my-project/notificationChannels/12345"]

Solution

  1. Step 1: Recall notification channel format

    Google Cloud expects notification channels as full resource names in an array.
  2. Step 2: Match correct syntax

    "notificationChannels": ["projects/my-project/notificationChannels/12345"] uses the correct JSON key and full resource path format.
  3. Final Answer:

    "notificationChannels": ["projects/my-project/notificationChannels/12345"] -> Option D
  4. Quick Check:

    Notification channels use full resource names in array [OK]
Hint: Use full resource names in an array for notificationChannels [OK]
Common Mistakes:
  • Using wrong key names like notifyChannel
  • Providing notification channel as a string, not array
  • Omitting project prefix in resource name
3. Given this alerting policy condition snippet:
{"conditionThreshold": {"filter": "metric.type=\"compute.googleapis.com/instance/cpu/utilization\"", "comparison": "COMPARISON_GT", "thresholdValue": 0.8, "duration": "300s"}}

What triggers this alert?
medium
A. CPU utilization is less than 80% for 5 minutes
B. CPU utilization is greater than 80% for 5 minutes
C. CPU utilization is exactly 80% at any time
D. CPU utilization is greater than 80% for 30 seconds

Solution

  1. Step 1: Interpret the condition filter and comparison

    The filter targets CPU utilization metric, and comparison is greater than 0.8 (80%).
  2. Step 2: Understand the duration

    The duration is 300 seconds, meaning the condition must hold for 5 minutes continuously.
  3. Final Answer:

    CPU utilization is greater than 80% for 5 minutes -> Option B
  4. Quick Check:

    Threshold > 0.8 for 300s = alert [OK]
Hint: Check comparison and duration for alert trigger [OK]
Common Mistakes:
  • Confusing greater than with less than
  • Ignoring duration requirement
  • Assuming exact equality triggers alert
4. You created an alerting policy but no notifications are sent when the condition is met. What is the most likely cause?
medium
A. Notification channels are not configured or linked properly
B. The metric filter is too broad
C. The alerting policy is disabled by default
D. The project has no billing account

Solution

  1. Step 1: Check notification channel setup

    If no notifications arrive, the most common cause is missing or incorrect notification channels.
  2. Step 2: Verify alerting policy status and billing

    Alerting policies are enabled by default and billing issues usually don't block notifications.
  3. Final Answer:

    Notification channels are not configured or linked properly -> Option A
  4. Quick Check:

    No notifications usually mean missing channels [OK]
Hint: Verify notification channels linked to policy [OK]
Common Mistakes:
  • Assuming alerting policies are disabled by default
  • Blaming billing for notification failure
  • Ignoring notification channel configuration
5. You want to create an alerting policy that notifies your team only if CPU usage is above 70% for 10 minutes, but only during business hours (9 AM to 5 PM). Which approach best achieves this?
hard
A. Set the alert threshold to 70% and rely on team to ignore alerts outside business hours
B. Create an alerting policy without conditions and manually check CPU usage during business hours
C. Use an alerting policy with a condition on CPU usage and add a time window using an uptime check or schedule-based notification channel
D. Configure the alerting policy to notify continuously regardless of time

Solution

  1. Step 1: Define CPU usage condition with duration

    Set condition threshold to >70% CPU usage sustained for 10 minutes.
  2. Step 2: Limit notifications to business hours

    Use scheduling features like uptime checks or notification channel schedules to restrict alerts to 9 AM-5 PM.
  3. Final Answer:

    Use an alerting policy with a condition on CPU usage and add a time window using an uptime check or schedule-based notification channel -> Option C
  4. Quick Check:

    Combine metric condition + time window for precise alerts [OK]
Hint: Combine metric condition with time-based notification [OK]
Common Mistakes:
  • Ignoring time restrictions in alerting policy
  • Relying on manual checks instead of automation
  • Not setting duration for CPU usage condition
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard