mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs:fixes alerting support escalations (#69770)
* Docs:fixes alerting support escalations * updates recording rule text * adds link * fixes link * Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fixes relref * adds link to prometheus docs * fixes relref --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -18,6 +18,14 @@ weight: 400
|
||||
|
||||
You can create and manage recording rules for an external Grafana Mimir or Loki instance. Recording rules calculate frequently needed expressions or computationally expensive expressions in advance and save the result as a new set of time series. Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.
|
||||
|
||||
**Note:**
|
||||
|
||||
Recording rules are run as instant rules, which means that they run every 10s. To overwrite this configuration, update the min_interval in your custom configuration file.
|
||||
|
||||
[min_interval]({{< relref "../../setup-grafana/configure-grafana" >}}) sets the minimum interval to enforce between rule evaluations. The default value is 10s which equals the scheduler interval. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as fewer evaluations are scheduled over time.
|
||||
|
||||
This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
|
||||
@@ -44,25 +52,7 @@ To create a Grafana Mimir or Loki managed recording rule
|
||||
1. In Step 2, select **Mimir or Loki recording rule** option.
|
||||
- Select your Loki or Prometheus data source.
|
||||
- Enter a PromQL or LogQL query.
|
||||
1. In Step 3, add the namespace and the group.
|
||||
- From the **Namespace** dropdown, select an existing rule namespace. Otherwise, click Add new and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Grafana Mimir or Loki rule groups and namespaces]({{< relref "./edit-mimir-loki-namespace-group" >}}).
|
||||
- From the **Group** dropdown, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one.
|
||||
1. In Step 4, add the custom labels.
|
||||
- Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value.
|
||||
1. Click **Save** to save the recording rule or **Save and exit** to save the recording rule and go back to the Alerting page.
|
||||
|
||||
<!-- delete next steps? -->
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Alert rules**.
|
||||
1. Click **+ Create alert rule**.
|
||||
1. In Step 1, add the rule name.
|
||||
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
|
||||
1. In Step 2, add the type, and storage location.
|
||||
- From the **Rule type** dropdown, select **Mimir / Loki managed alert**.
|
||||
- From the **Select data source** dropdown, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
|
||||
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
|
||||
1. In Step 3, add evaluation behavior.
|
||||
1. In Step 3, add alert evaluation behavior.
|
||||
- Enter a valid **For** duration. The expression has to be true for this long for the alert to be fired.
|
||||
1. In Step 4, add additional metadata associated with the rule.
|
||||
- From the **Namespace** dropdown, select an existing rule namespace. Otherwise, click Add new and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Grafana Mimir or Loki rule groups and namespaces]({{< relref "./edit-mimir-loki-namespace-group" >}}).
|
||||
|
||||
@@ -61,3 +61,7 @@ To remove a silence, complete the following steps.
|
||||
1. Select the silence you want to end, then click **Unsilence**.
|
||||
|
||||
> **Note:** You cannot remove a silence manually. Silences that have ended are retained and listed for five days.
|
||||
|
||||
## Useful links
|
||||
|
||||
[Aggregation operators](/docs/prometheus/latest/querying/operators/#aggregation-operators)
|
||||
|
||||
@@ -179,7 +179,13 @@ Template the title of a Slack message to contain the number of firing and resolv
|
||||
|
||||
## Template the content of a Slack message
|
||||
|
||||
Template the content of a Slack message to contain a description of all firing and resolved alerts, including their labels, annotations, Silence URL and Dashboard URL:
|
||||
Template the content of a Slack message to contain a description of all firing and resolved alerts, including their labels, annotations, Silence URL and Dashboard URL.
|
||||
|
||||
**Note:**
|
||||
|
||||
This template is for Grafana-managed alerts only.
|
||||
To use the template for Grafana Mimir/Loki-managed alerts, delete the references to DashboardURL and SilenceURL.
|
||||
For more information, see the [Prometheus documentation on notifications](https://prometheus.io/docs/alerting/latest/notifications/).
|
||||
|
||||
```
|
||||
1 firing alert(s):
|
||||
|
||||
@@ -52,6 +52,10 @@ title: 'Alerting Provisioning HTTP API '
|
||||
|
||||
### Contact points
|
||||
|
||||
**Note:**
|
||||
|
||||
Contact point provisioning is for Grafana-managed alerts only.
|
||||
|
||||
| Method | URI | Name | Summary |
|
||||
| ------ | ----------------------------------------- | --------------------------------------------------------- | --------------------------------- |
|
||||
| DELETE | /api/v1/provisioning/contact-points/{UID} | [route delete contactpoints](#route-delete-contactpoints) | Delete a contact point. |
|
||||
|
||||
Reference in New Issue
Block a user