Enable doc-validator for alerting directories (#68964)

* Enable doc-validator for alerting directories

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Adds missing description frontmatter

* Fix some more links

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix some more links

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fixes anchors

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
This commit is contained in:
Jack Baldry
2023-05-24 14:12:30 +01:00
committed by GitHub
co-authored by brendamuir
parent 2966989525
commit 6c4cf4f8b9
51 changed files with 168 additions and 157 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
---
aliases:
- unified-alerting/set-up/
description: How to set up alerting features and integrations
title: Set up Alerting
weight: 107
---
@@ -9,6 +10,6 @@ weight: 107
Configure the features and integrations that you need to create and manage your alerts.
- [Configure Alertmanager](https://grafana.com/docs/grafana/latest/alerting/set-up/configure-alertmanager/)
- [Provision Grafana Alerting resources](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/)
- [Connect Grafana Alerting to Grafana OnCall](https://grafana.com/docs/oncall/latest/integrations/available-integrations/add-grafana-alerting/)
- [Configure Alertmanager]({{< relref "./configure-alertmanager" >}})
- [Provision Grafana Alerting resources]({{< relref "./provision-alerting-resources" >}})
- [Connect Grafana Alerting to Grafana OnCall](/docs/oncall/latest/integrations/available-integrations/add-grafana-alerting/)
@@ -22,7 +22,7 @@ There are three options to choose from:
1. Provision your alerting resources using the Alerting Provisioning HTTP API.
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning API]({{< relref "../../../developers/http_api/alerting_provisioning" >}}).
1. Provision your alerting resources using Terraform.
@@ -22,14 +22,14 @@ Details on how to set up the files and which fields are required for each object
**Note:**
Provisioning takes place during the initial set up of your Grafana system, but you can re-run it at any time using the [Grafana Admin API](https://grafana.com/docs/grafana/latest/developers/http_api/admin/#reload-provisioning-configurations).
Provisioning takes place during the initial set up of your Grafana system, but you can re-run it at any time using the [Grafana Admin API]({{< relref "../../../../developers/http_api/admin#reload-provisioning-configurations" >}}).
### Provision alert rules
Create or delete alert rules in your Grafana instance(s).
1. Create alert rules in Grafana.
1. Use the [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#route-get-alert-rule-export) export endpoints to download a provisioning file for your alert rules.
1. Use the [Alerting provisioning API]({{< relref "../../../../developers/http_api/alerting_provisioning" >}}) export endpoints to download a provisioning file for your alert rules.
1. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
Example configuration files can be found below.
@@ -33,9 +33,9 @@ Complete the following tasks to create and manage your alerting resources using
## Create an API key for provisioning
You can [create a normal Grafana API key](https://grafana.com/docs/grafana/latest/administration/api-keys/) to authenticate Terraform with Grafana. Most existing tooling using API keys should automatically work with the new Grafana Alerting support.
You can [create a normal Grafana API key]({{< relref "../../../../administration/api-keys" >}}) to authenticate Terraform with Grafana. Most existing tooling using API keys should automatically work with the new Grafana Alerting support.
There are also dedicated RBAC roles for alerting provisioning. This lets you easily authenticate as a [service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/) with the minimum permissions needed to provision your Alerting infrastructure.
There are also dedicated RBAC roles for alerting provisioning. This lets you easily authenticate as a [service account]({{< relref "../../../../administration/service-accounts" >}}) with the minimum permissions needed to provision your Alerting infrastructure.
To create an API key for provisioning, complete the following steps.
@@ -222,13 +222,13 @@ You cannot edit resources provisioned from Terraform from the UI. This ensures t
## Provision alert rules
[Alert rules](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/) enable you to alert against any Grafana data source. This can be a data source that you already have configured, or you can [define your data sources in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) alongside your alert rules.
[Alert rules]({{< relref "../../../alerting-rules" >}}) enable you to alert against any Grafana data source. This can be a data source that you already have configured, or you can [define your data sources in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) alongside your alert rules.
To provision alert rules, complete the following steps.
1. Create a data source to query and a folder to store your rules in.
In this example, the [TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) data source is used.
In this example, the [TestData]({{< relref "../../../../datasources/testdata" >}}) data source is used.
Alerts can be defined against any backend datasource in Grafana.
@@ -245,7 +245,7 @@ resource "grafana_folder" "rule_folder" {
2. Define an alert rule.
For more information on alert rules, refer to [how to create Grafana-managed alerts](https://grafana.com/blog/2022/08/01/grafana-alerting-video-how-to-create-alerts-in-grafana-9/).
For more information on alert rules, refer to [how to create Grafana-managed alerts](/blog/2022/08/01/grafana-alerting-video-how-to-create-alerts-in-grafana-9/).
3. Create a rule group containing one or more rules.
@@ -7,7 +7,8 @@ keywords:
- alerting
- alerting resources
- provisioning
title: View provisioned resources in Grafana
title: View provisioned alerting resources in Grafana
menuTitle: View provisioned resources in Grafana
weight: 300
---