Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Create and edit alert rules
Creating alerts in Grafana Cloud differs from creating alerts directly with Prometheus or Loki. While the rule format is the same, everything is done in the Grafana Cloud Alerting interface, rather than with configuration files.
Note
Only organization Admins can create or edit alert rules.
Create an alert rule
- In Grafana, hover your cursor over the Grafana Cloud Alerting icon and then click Alerts and rules.
- If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
- Click Edit rules.
- Click Add rule.
Grafana creates a new rule with placeholders.
alert: ""
expr: ""
Enter text according to regular Prometheus rule configuration guidelines:
Note
Grafana Cloud Alerting does not support comments.
When you are finished, click Save. You can then repeat the process to create more rules or click Finish editing to return to the rules list.
Edit an alert rule
- In Grafana, hover your cursor over the Grafana Cloud Alerting icon and then click Alerts and rules.
- If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
- Click Edit rules.
- Scroll down to the rule that you want to edit and then click Edit.
- Make any necessary changes to the rule text and then click Save.
- Click Finish editing to return to the rules list.
Delete an alert rule
- In Grafana, hover your cursor over the Grafana Cloud Alerting icon and then click Alerts and rules.
- If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
- Click Edit rules.
- Scroll down to the rule that you want to edit and then click Delete.
- Click Finish editing to return to the rules list.