Alerting: Update 'Create alert' to 'New alert rule' in the panel and docs (#76950)

* Update 'Create alert' to 'New alert rule' in the panel and docs

* Fix test
This commit is contained in:
Sonia Aguilar
2023-11-02 17:33:53 +01:00
committed by GitHub
parent 878235248e
commit 0abfc3b6be
16 changed files with 32 additions and 32 deletions
@@ -202,7 +202,7 @@ Create alerts from any panel type. This means you can reuse the queries in the p
1. Navigate to a dashboard in the **Dashboards** section.
2. In the top right corner of the panel, click on the three dots (ellipses).
3. From the dropdown menu, select **More...** and then choose **Create alert**.
3. From the dropdown menu, select **More...** and then choose **New alert rule**.
This will open the alert rule form, allowing you to configure and create your alert based on the current panel's query.
@@ -44,7 +44,7 @@ In these steps you'll create an alert and define an expression to evaluate. Thes
### Create a Grafana-managed alert
1. Navigate in Grafana to **Alerting**, then to **Alert Rules** and click **+ Create alert rule**.
1. Navigate in Grafana to **Alerting**, then to **Alert Rules** and click **+ New alert rule**.
1. Choose **Grafana Managed Alert** to create an alert that uses expressions.
1. Select your Loki datasource from the drop-down.
1. Enter the alert query in the query editor, switch to **code** mode in the top right corner of the editor to paste the query below:
@@ -328,7 +328,7 @@ We have now created a dummy webhook endpoint and created a new Alerting Contact
Now that Grafana knows how to notify us, it's time to set up an alert rule:
1. In the sidebar, click **Alert rules**.
1. Click **Create alert rule**.
1. Click **New alert rule**.
1. In section **1**, name the rule `fundamentals-test`.
1. For section **2**, select **Grafana Managed Alert** as the rule type. Next, find query box **A**. Choose your Prometheus datasource and enter the same query that we used in our earlier panel: `sum(rate(tns_request_duration_seconds_count[5m])) by(route)`. Click **Run queries**. You should see some data in the graph.
1. Now scroll down to query box **B**. Change the operation from **Reduce** to **Classic condition**. [You can read more about classic and multi-dimensional conditions here](/docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule/#single-and-multi-dimensional-rule). For conditions enter the following: `WHEN last() OF A IS ABOVE 0.2`. Delete query **C**.