Course contentsShow
← Cloud and Infrastructure
Lesson 2001 of 2,98942. Observability - MetricsFree lesson

Alerting in Grafana

Learn how to configure alerts in Grafana including alert rules, notification channels, and alert routing.

Alerting in Grafana

You'll learn how to configure alerts in Grafana to proactively notify you when metrics cross critical thresholds.

What Is Alerting in Grafana?

Alerting transforms Grafana from a passive visualization tool into an active monitoring system. Instead of constantly watching dashboards, you define alert rules that continuously evaluate your queries and trigger notifications when conditions are met—like a smoke detector that watches for danger while you sleep.

Core Components

Alert Rules

Alert rules define what triggers an alert. You specify:

  • A query (using your data source, like Prometheus)
  • A condition (e.g., "CPU usage > 80%")
  • An evaluation interval (how often Grafana checks)
  • A duration threshold (how long the condition must persist)

Think of this as setting your thermostat: "If temperature exceeds 75°F for more than 5 minutes, take action."

Notification Channels (Contact Points)

Notification channels define where alerts go when triggered. Grafana supports:

  • Email
  • Slack
  • PagerDuty
  • Webhooks
  • Many other integrations

You configure these once and reuse them across multiple alerts.

Alert Routing

Alert routing (via notification policies) determines which alerts go to which channels. You can route based on labels—for example, sending database alerts to the DBA team and application alerts to developers. This prevents alert fatigue by ensuring the right people get the right notifications.

The Flow

  1. Alert rule evaluates your query every X seconds
  2. If the condition is met for the specified duration, the alert fires
  3. Grafana routes the alert based on labels and policies
  4. Notifications are sent to the configured channels
  5. When the condition resolves, Grafana sends a recovery notification

Key Takeaway: Grafana alerting automates monitoring by continuously evaluating queries, triggering notifications through configurable channels, and routing alerts intelligently to prevent alarm fatigue.