Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Grafana Alerting

Direct answer

Grafana Alerting evaluates alert rules over any data source and sends notifications through contact points and notification policies.

When to use this

Use it when alerts are defined in Grafana instead of Prometheus/Alertmanager.

First 30 seconds

1. Rules state: Alerting → Alert rules, or curl -s http://grafana/api/prometheus/grafana/api/v1/rules.

2. No-data/error state handling.

3. Notification policy routing.

4. Contact point test.

5. Rules provisioned.

Operational verification

rule query → condition → state → notification policy → contact point

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it when alerts are defined in Grafana instead of Prometheus/Alertmanager.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Trigger a test alert and confirm it reaches the right channel. Review rules that are always firing or never fire.

Step 2 Common failures Narrow the fault

A rule with "no data" handling set wrongly fires on every data source glitch. Policies that never match labels send alerts to the default contact point. Provisioned rules edited in the UI are overwritten.

Key points

Choose one alerting system per signal to avoid duplicates. Provision rules as code. Configure no-data and error handling explicitly.

Key checks
  • curl -s http://grafana/api/prometheus/grafana/api/v1/rules — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid
ReferenceWhat it is1 section · depth on demand

How it works

The alerting engine runs rules in evaluation groups. Firing alerts are sent to the built-in Alertmanager or an external one, which groups, deduplicates and routes them.

ReferenceImportant terms & boundaries3 sections · depth on demand

Alert structure

PartPurpose
Query + conditionWhat is evaluated and the threshold
Pending period ("for")Ignore short spikes
LabelsRouting (team, severity)
AnnotationsSummary, description, runbook URL, dashboard link
Contact points & notification policiesWhere and how notifications go

Test alerts with real data, and handle "No data" and "Error" states deliberately (alert, OK or keep last state).

In depth

From rule to notification

alert rule (query + expressions + condition, evaluated every interval)
  → pending for "pending period"  → firing
  → labels matched by the notification policy tree
  → contact point (e-mail, Slack, PagerDuty, webhook …)

Parts of a rule

PartSet to
QueryThe data, e.g. error ratio per service
ExpressionsReduce (last, mean) and threshold, or math across queries
Evaluation group + intervalRules evaluated together, e.g. every 1 m
Pending periodHow long the condition must hold (e.g. 5 m) to fire
Labelsseverity, team, service — used by notification policies
AnnotationsSummary, description, runbook URL, dashboard link
No data / error handlingWhat to do when the query returns nothing or fails

No data and error states

SettingEffectUse when
NoDataFires a separate "no data" alertMissing data is itself a problem (heartbeat)
AlertingTreat as firingConservative for critical signals
OK / NormalTreat as healthySparse metrics that are often absent
KeepLastKeep last stateShort gaps in otherwise steady data

Getting this wrong is the main source of alerts that fire on every data source hiccup — or never fire when an exporter dies.

Notification policies

Policies form a tree matched by labels; the first matching child wins unless continue matching is enabled. Group by alertname plus the labels that identify one incident (service, cluster), and use mute timings for planned quiet periods instead of disabling rules.

Provisioning

Define rules, contact points and policies as code (file provisioning, Terraform or the alerting API) so a rule changed in the UI does not silently differ from what is in Git.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Alerts defined in several places.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
grafana alertinggrafana alertingnotification policy contact point
Confirmation

Confirm action

Continue?