Docs: adds alerting provisioning updates (#78454)

* Docs: adds alerting provisioning updates

* prettier and changed passives
This commit is contained in:
brendamuir 2023-11-21 13:55:39 +01:00 committed by GitHub
parent bd6f8e6ef7
commit 0e3c39c0e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 14 deletions

View File

@ -22,21 +22,25 @@ weight: 300
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
There are three options to choose from:
Provisioning for Grafana Alerting supports alert rules, contact points, notification policies, mute timings, and templates.
You cannot edit provisioned alerting resources in the Grafana UI in the same way as unprovisioned alerting resources. You can only edit provisioned contact points, notification policies, templates, and mute timings in the source where they were created. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
To modify provisioned alert rules, you can use the **Modify export** feature to edit and then export.
Choose from the options below to provision your Grafana Alerting resources.
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
1. Provision your alerting resources using the Alerting Provisioning HTTP API.
{{% admonition type="note" %}}
File provisioning is not available in Grafana Cloud instances.
{{% /admonition %}}
2. Use the Alerting Provisioning HTTP API.
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning HTTP API][alerting_provisioning].
1. {{% admonition type="note" %}}
If you are using Open Source, you can provision your alerting resources using [Terraform](https://www.terraform.io/).
{{% /admonition %}}
**Note:**
Currently, provisioning for Grafana Alerting supports alert rules, contact points, notification policies, mute timings, and templates. Provisioned alerting resources using file provisioning or Terraform can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
3. Use [Terraform](https://www.terraform.io/).
**Useful Links:**

View File

@ -2,7 +2,7 @@
aliases:
- ../../provision-alerting-resources/view-provisioned-resources/
canonical: https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/view-provisioned-resources/
description: View provisioned resources in Grafana
description: Manage provisioned resources in Grafana
keywords:
- grafana
- alerting
@ -13,14 +13,16 @@ labels:
- cloud
- enterprise
- oss
menuTitle: View provisioned resources in Grafana
title: View provisioned alerting resources in Grafana
menuTitle: Manage provisioned resources in Grafana
title: Manage provisioned alerting resources in Grafana
weight: 300
---
# View provisioned alerting resources in Grafana
# Manage provisioned alerting resources in Grafana
Verify that your alerting resources were created in Grafana.
Verify that your alerting resources were created in Grafana, as well as edit or export your provisioned alerting resources.
## View provisioned alerting resoureces
To view your provisioned resources in Grafana, complete the following steps.
@ -30,6 +32,49 @@ To view your provisioned resources in Grafana, complete the following steps.
Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually.
## Export provisioned alerting resources
Export your alerting resources, such as alert rules, contact points, and notification policies in JSON, YAML, or Terraform format. You can export all Grafana-managed alert rules, single folders, and single groups.
To export provisioned alerting resources from the Grafana UI, complete the following steps.
1. Click **Alerts & IRM** -> **Alert rules**.
1. To export all Grafana-managed rules, click **More v** -> **Export all Grafana-managed rules**.
1. To export a folder, change the **View as** to **List**.
1. Select the folder you want to export and click the **Export rules folder** icon.
1. To export a group, change the **View as** to **Grouped**.
1. Find the group you want to export and click the **Export rule group** icon.
1. Choose the format to export in.
Note that formats JSON and YAML are suitable only for file provisioning. To get rule definition in provisioning API format, use the provisioning GET API.
1. Click **Copy Code** or **Download**.
1. Choose **Copy Code** to go to an existing file and paste in the code.
1. Choose **Download** to download a file with the exported data.
## Edit provisioned alert rules
Use the **Modify export** mode for alert rules to edit provisioned alert rules and export a modified version.
{{% admonition type="note" %}} This feature is for Grafana-managed alert rules only. It is available to Admin, Viewer, and Editor roles. {{% /admonition %}}
To edit provisioned alerting alert rules from the Grafana UI, complete the following steps.
1. Click **Alerts & IRM** -> **Alert rules**.
1. Locate the alert rule you want to edit and click **More** -> **Modify Export** to open the Alert Rule form.
1. From the Alert Rule form, edit the fields you want to change.
1. Click **Export** to export all alert rules within the group.
You can only export groups of rules; not single rules.
The exported rule data appears in different formats - HTML, JSON, Terraform.
1. Choose the format to export in.
1. Click **Copy Code** or **Download**.
a. Choose **Copy Code** to go to an existing file and paste in the code.
b. Choose **Download** to download a file with the exported data.
## Edit API-provisioned alerting resources
To enable editing of API-provisioned resources in the Grafana UI, add the `X-Disable-Provenance` header to the following requests in the API: