Architecture
The unified alerting system consists of several key components:Alert Rules
Alert rules define the conditions that trigger alerts. Grafana supports two types of rules:- Alerting Rules: Evaluate queries and fire alerts when conditions are met
- Recording Rules: Pre-compute frequently needed or computationally expensive expressions and save their result as a new set of time series
Notification System
The notification system handles how and where alerts are sent:- Contact Points: Define the destinations where notifications are sent (email, Slack, PagerDuty, etc.)
- Notification Policies: Route alerts to appropriate contact points based on labels
- Notification Templates: Customize the content and format of alert notifications
Alert Management
- Alert Groups: Organize related firing alerts together
- Silences: Temporarily mute notifications for specific alerts
- Mute Timings: Schedule recurring periods when notifications should be suppressed
Rule Types
Rule States
NoData Handling
When a query returns no data, the rule can transition to different states:- Alerting: Treat no data as an alert condition
- NoData: Create a specific “No Data” alert state
- OK: Treat no data as normal (resolve alert)
- KeepLast: Maintain the previous state
Error Handling
When query execution fails:- Alerting: Treat errors as alert conditions
- Error: Create a specific “Error” alert state
- OK: Treat errors as normal
- KeepLast: Maintain the previous state
Alert Evaluation
Alert rules are evaluated on a scheduled interval:- Query Execution: All data queries are executed
- Expression Evaluation: Server-side expressions process query results
- Condition Check: The condition expression determines alert state
- State Transition: Alert state changes trigger notifications
- Notification Routing: Alerts are routed to contact points via policies
Organization Structure
- Folders: Organize rules and control access permissions
- Rule Groups: Rules that share the same evaluation interval
- Alert Rules: Individual alert definitions
Key Labels & Annotations
Reserved Labels
grafana_folder: Automatically added with folder titlealertname: Alert rule name__grafana_receiver__: Auto-routing receiver name__grafana_route_settings_hash__: Notification settings hash
Special Annotations
__dashboardUid__: Dashboard UID for panel alerts__panelId__: Panel ID for dashboard integrationgrafana_state_reason: Explains state transitions (NoData, Error, etc.)
Data Sources
Unified alerting supports:- Grafana-managed: Rules stored in Grafana’s database
- Mimir/Loki: Rules stored in external ruler APIs
- Prometheus: Compatible alert rule format
Backend Components
Related Pages
Alert Rules
Learn how to create and configure alert rules
Contact Points
Configure where notifications are sent
Notification Policies
Route alerts to the right destinations
Silences
Temporarily mute alert notifications