---
title: Alert Rules
slug: alert-rules
docTags: 
createdAt: 2024-02-06T20:08:14.632Z
---

Alert rules define the conditions under which an alert should be triggered.

## Creating an Alert Rule

1. Navigate to Alerting > Alert rules
2. Click "New alert rule"
3. Choose a data source (e.g., Prometheus, Loki, InfluxDB)
4. Define the query using PromQL, LogQL, or the appropriate query language
5. Set alert conditions:&#x20;
   - Specify the evaluation interval
   - Define the condition (e.g., "IS ABOVE", "IS BELOW")
   - Set the threshold value
6. Configure alert details:&#x20;
   - Name the alert
   - Choose a folder for organization
   - Add labels for categorization and routing
   - Set annotations for additional context
7. Save the rule

![](https://api.archbee.com/api/optimize/A1ybFzEd4Yg88MHjQbQjT-kyJB0tzmTr9P83vYNilrH-20240802-023847.png)

## Types of Alert Rules

- Grafana-managed rules
- Data source-specific rules (e.g., Prometheus, Loki)
- Recording rules

