Course contentsShow
← Cloud and Infrastructure
Lesson 641 of 2,98912. Monitoring FoundationsFree lesson

Threshold-Based Alarms

Create alarms that trigger when a metric crosses a static threshold value for a specified period.

Threshold-Based Alarms

What you'll learn: How to create alarms that automatically trigger when a monitored metric crosses a predefined threshold value for a specified duration.


The Core Concept

A threshold-based alarm watches a single metric and fires when that metric crosses a static boundary you've set. Think of it like a thermostat: you set the temperature to 72°F, and when the room gets too hot or too cold, the system reacts.

In cloud monitoring, you define:

  • The metric to watch (like CPU usage or error count)
  • The threshold value (e.g., 80%)
  • The comparison operator (greater than, less than, equal to)
  • The evaluation period (how long the condition must persist)

How It Works

Imagine you're monitoring server CPU usage. You create an alarm:

  • Metric: CPUUtilization
  • Threshold: 80
  • Operator: Greater than
  • Duration: 5 consecutive minutes

The alarm stays in an OK state while CPU runs at 75%. If CPU spikes to 85% for just 2 minutes, nothing happens—the condition hasn't persisted long enough. But if CPU stays above 80% for the full 5 minutes, the alarm transitions to ALARM state and triggers your configured action (like sending a notification or scaling up resources).

Why Duration Matters

The evaluation period prevents false alarms from temporary spikes. A brief CPU burst during a batch job shouldn't wake you up at 3 AM, but sustained high usage indicating a real problem should.

Common Threshold Patterns

  • Upper bound: Alert when metric exceeds maximum (CPU > 80%)
  • Lower bound: Alert when metric drops below minimum (available memory < 1GB)
  • Equality: Alert on specific values (HTTP 500 errors > 0)

Key Takeaway: Threshold-based alarms trigger when a metric crosses a static value for a defined period, balancing sensitivity with reliability by requiring sustained conditions before alerting.