Create and edit alert rules

AlertsGrafana Cloud AlertingCreate 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

  1. In Grafana, hover your cursor over the Grafana Cloud Alerting icon and then click Alerts and rules.
  2. 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.
  3. Click Edit rules.
  4. 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

  1. In Grafana, hover your cursor over the Grafana Cloud Alerting icon and then click Alerts and rules.
  2. 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.
  3. Click Edit rules.
  4. Scroll down to the rule that you want to edit and then click Edit.
  5. Make any necessary changes to the rule text and then click Save.
  6. Click Finish editing to return to the rules list.

Delete an alert rule

  1. In Grafana, hover your cursor over the Grafana Cloud Alerting icon and then click Alerts and rules.
  2. 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.
  3. Click Edit rules.
  4. Scroll down to the rule that you want to edit and then click Delete.
  5. Click Finish editing to return to the rules list.