From ed451d6e55e26244691ff4e317b182a287d5504a Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Tue, 21 May 2024 13:41:46 +0100 Subject: [PATCH] [v10.4.x] [docs/sources/alerting] Replace docs/reference shortcode with ref URIs (#88067) --- docs/sources/alerting/_index.md | 23 ++- .../sources/alerting/alerting-rules/_index.md | 53 +++--- .../create-grafana-managed-rule.md | 73 ++++---- ...reate-mimir-loki-managed-recording-rule.md | 21 ++- .../create-mimir-loki-managed-rule.md | 31 ++-- .../create-notification-policy.md | 13 +- .../integrations/configure-oncall.md | 33 ++-- .../integrations/configure-slack.md | 14 +- docs/sources/alerting/fundamentals/_index.md | 24 ++- .../fundamentals/alert-rules/_index.md | 43 +++-- .../alert-rules/queries-conditions/_index.md | 23 ++- .../alert-rules/rule-evaluation/_index.md | 10 +- .../alerting/fundamentals/alertmanager.md | 13 +- .../fundamentals/annotation-label/_index.md | 17 +- .../annotation-label/how-to-use-labels.md | 23 ++- .../variables-label-annotation.md | 15 +- .../fundamentals/data-source-alerting.md | 173 +++++++++++------- .../fundamentals/evaluate-grafana-alerts.md | 14 +- .../fundamentals/high-availability/_index.md | 15 +- .../notification-policies/notifications.md | 13 +- .../alerting/manage-notifications/_index.md | 53 +++--- .../images-in-notifications.md | 25 +-- .../manage-notifications/mute-timings.md | 21 ++- .../template-notifications/_index.md | 33 ++-- .../create-notification-templates.md | 4 +- .../use-notification-templates.md | 21 ++- .../using-go-templating-language.md | 29 +-- docs/sources/alerting/monitor/_index.md | 6 +- docs/sources/alerting/set-up/_index.md | 61 +++--- .../configure-high-availability/_index.md | 6 +- .../set-up/migrating-alerts/_index.md | 23 ++- .../legacy-alerting-deprecation.md | 31 ++-- .../provision-alerting-resources/_index.md | 47 +++-- .../export-alerting-resources/index.md | 166 ++++++++++------- .../file-provisioning/index.md | 75 ++++---- .../terraform-provisioning/index.md | 138 ++++++++------ 36 files changed, 793 insertions(+), 590 deletions(-) diff --git a/docs/sources/alerting/_index.md b/docs/sources/alerting/_index.md index 6d0c0f1a627..ddde20325d8 100644 --- a/docs/sources/alerting/_index.md +++ b/docs/sources/alerting/_index.md @@ -12,6 +12,17 @@ labels: - oss title: Alerting weight: 114 +refs: + fundamentals: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/ + alerting-rules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/ --- # Alerting @@ -28,7 +39,7 @@ Grafana Alerting is available for Grafana OSS, Grafana Enterprise, or Grafana Cl Watch this video to learn more about Grafana Alerting: {{< vimeo 720001629 >}} -_Refer to [Manage your alert rules][alerting-rules] for current instructions._ +_Refer to [Manage your alert rules](ref:alerting-rules) for current instructions._ ## Key features and benefits @@ -89,12 +100,4 @@ Here are some tips on how to create an effective alert management set up for you ## Useful links -- [Introduction to Alerting][fundamentals] - -{{% docs/reference %}} -[alerting-rules]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules" -[alerting-rules]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules" - -[fundamentals]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals" -[fundamentals]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals" -{{% /docs/reference %}} +- [Introduction to Alerting](ref:fundamentals) diff --git a/docs/sources/alerting/alerting-rules/_index.md b/docs/sources/alerting/alerting-rules/_index.md index 3063d36929a..c82bdc6c767 100644 --- a/docs/sources/alerting/alerting-rules/_index.md +++ b/docs/sources/alerting/alerting-rules/_index.md @@ -14,6 +14,32 @@ labels: menuTitle: Configure title: Configure Alerting weight: 120 +refs: + create-mimir-loki-managed-rule: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-mimir-loki-managed-rule/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-mimir-loki-managed-rule/ + create-grafana-managed-rule: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-grafana-managed-rule/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-grafana-managed-rule/ + manage-contact-points: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/manage-contact-points/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/manage-contact-points/ + create-notification-policy: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-notification-policy/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-notification-policy/ + create-mimir-loki-managed-recording-rule: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-mimir-loki-managed-recording-rule/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-mimir-loki-managed-recording-rule/ --- # Configure Alerting @@ -22,37 +48,20 @@ Configure the features and integrations that you need to create and manage your **Configure alert rules** -[Configure Grafana-managed alert rules][create-grafana-managed-rule]. +[Configure Grafana-managed alert rules](ref:create-grafana-managed-rule). -[Configure data source-managed alert rules][create-mimir-loki-managed-rule] +[Configure data source-managed alert rules](ref:create-mimir-loki-managed-rule) **Configure recording rules** _Recording rules are only available for compatible Prometheus or Loki data sources._ -For more information, see [Configure recording rules][create-mimir-loki-managed-recording-rule]. +For more information, see [Configure recording rules](ref:create-mimir-loki-managed-recording-rule). **Configure contact points** -For information on how to configure contact points, see [Configure contact points][manage-contact-points]. +For information on how to configure contact points, see [Configure contact points](ref:manage-contact-points). **Configure notification policies** -For information on how to configure notification policies, see [Configure notification policies][create-notification-policy]. - -{{% docs/reference %}} -[create-mimir-loki-managed-rule]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-mimir-loki-managed-rule" -[create-mimir-loki-managed-rule]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-mimir-loki-managed-rule" - -[create-mimir-loki-managed-recording-rule]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-mimir-loki-managed-recording-rule" -[create-mimir-loki-managed-recording-rule]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-mimir-loki-managed-recording-rule" - -[create-grafana-managed-rule]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-grafana-managed-rule" -[create-grafana-managed-rule]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-grafana-managed-rule" - -[manage-contact-points]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/manage-contact-points" -[manage-contact-points]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/manage-contact-points" - -[create-notification-policy]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-notification-policy" -[create-notification-policy]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-notification-policy" -{{% /docs/reference %}} +For information on how to configure notification policies, see [Configure notification policies](ref:create-notification-policy). diff --git a/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md b/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md index ae03719e210..ae8c89f5b13 100644 --- a/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md +++ b/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md @@ -18,6 +18,37 @@ labels: - oss title: Configure Grafana-managed alert rules weight: 100 +refs: + alerting-on-numeric-data: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/evaluate-grafana-alerts/#alerting-on-numeric-data-1 + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/evaluate-grafana-alerts/#alerting-on-numeric-data-1 + time-units-and-relative-ranges: + - pattern: /docs/grafana/ + destination: /docs/grafana//dashboards/use-dashboards/#time-units-and-relative-ranges + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//dashboards/use-dashboards/#time-units-and-relative-ranges + add-a-query: + - pattern: /docs/grafana/ + destination: /docs/grafana//panels-visualizations/query-transform-data/#add-a-query + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//panels-visualizations/query-transform-data/#add-a-query + expression-queries: + - pattern: /docs/grafana/ + destination: /docs/grafana//panels-visualizations/query-transform-data/expression-queries/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//panels-visualizations/query-transform-data/expression-queries/ + annotation-label: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/annotation-label/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/ + fundamentals: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/ --- # Configure Grafana-managed alert rules @@ -56,7 +87,7 @@ To create a Grafana-managed alert rule, use the in-product alert creation flow a Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires. 1. Select a data source. -1. From the **Options** dropdown, specify a [time range][time-units-and-relative-ranges]. +1. From the **Options** dropdown, specify a [time range](ref:time-units-and-relative-ranges). **Note:** @@ -66,11 +97,11 @@ Define a query to get the data you want to measure and a condition that needs to 1. Add a query. - To add multiple [queries][add-a-query], click **Add query**. + To add multiple [queries](ref:add-a-query), click **Add query**. All alert rules are managed by Grafana by default. If you want to switch to a data source-managed alert rule, click **Switch to data source-managed alert rule**. -1. Add one or more [expressions][expression-queries]. +1. Add one or more [expressions](ref:expression-queries). a. For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series. @@ -194,24 +225,24 @@ Complete the following steps to set up labels and notifications. ## Add annotations -Add [annotations][annotation-label]. to provide more context on the alert in your alert notification message. +Add [annotations](ref:annotation-label). to provide more context on the alert in your alert notification message. Annotations add metadata to provide more information on the alert in your alert notification message. For example, add a **Summary** annotation to tell you which value caused the alert to fire or which server it happened on. -1. [Optional] Add a summary. +1. Optional: Add a summary. Short summary of what happened and why. -1. [Optional] Add a description. +1. Optional: Add a description. Description of what the alert rule does. -1. [Optional] Add a Runbook URL. +1. Optional: Add a Runbook URL. Webpage where you keep your runbook for the alert -1. [Optional] Add a custom annotation -1. [Optional] Add a dashboard and panel link. +1. Optional: Add a custom annotation +1. Optional: Add a dashboard and panel link. Links alerts to panels in a dashboard. @@ -225,13 +256,13 @@ For Grafana managed alerts, you can create a rule with a classic condition or yo Use the classic condition expression to create a rule that triggers a single alert when its condition is met. For a query that returns multiple series, Grafana does not track the alert state of each series. As a result, Grafana sends only a single alert even when alert conditions are met for multiple series. -For more information, see [expressions documentation][expression-queries]. +For more information, see [expressions documentation](ref:expression-queries). **Multi-dimensional rule** To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example: -- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data][alerting-on-numeric-data]. +- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data](ref:alerting-on-numeric-data). - Add a `Math` expression with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not fire, or a positive number if it should fire. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other. ![Query section multi dimensional](/static/img/docs/alerting/unified/rule-edit-multi-8-0.png 'Query section multi dimensional screenshot') @@ -275,23 +306,3 @@ Create alerts from any panel type. This means you can reuse the queries in the p 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. - -{{% docs/reference %}} -[add-a-query]: "/docs/grafana/ -> /docs/grafana//panels-visualizations/query-transform-data#add-a-query" -[add-a-query]: "/docs/grafana-cloud/ -> /docs/grafana//panels-visualizations/query-transform-data#add-a-query" - -[alerting-on-numeric-data]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/evaluate-grafana-alerts#alerting-on-numeric-data-1" -[alerting-on-numeric-data]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/evaluate-grafana-alerts#alerting-on-numeric-data-1" - -[annotation-label]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/annotation-label" -[annotation-label]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label" - -[expression-queries]: "/docs/grafana/ -> /docs/grafana//panels-visualizations/query-transform-data/expression-queries" -[expression-queries]: "/docs/grafana-cloud/ -> /docs/grafana//panels-visualizations/query-transform-data/expression-queries" - -[fundamentals]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals" -[fundamentals]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals" - -[time-units-and-relative-ranges]: "/docs/grafana/ -> /docs/grafana//dashboards/use-dashboards#time-units-and-relative-ranges" -[time-units-and-relative-ranges]: "/docs/grafana-cloud/ -> /docs/grafana//dashboards/use-dashboards#time-units-and-relative-ranges" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md b/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md index bedc33a981b..a9b2542ddc1 100644 --- a/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md +++ b/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md @@ -18,6 +18,17 @@ labels: - oss title: Configure recording rules weight: 300 +refs: + configure-grafana: + - pattern: /docs/grafana/ + destination: /docs/grafana//setup-grafana/configure-grafana/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//setup-grafana/configure-grafana/ + annotation-label: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/annotation-label/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/ --- # Configure recording rules @@ -28,7 +39,7 @@ You can create and manage recording rules for an external Grafana Mimir or Loki 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][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. +[min_interval](ref: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. @@ -63,11 +74,3 @@ To create recording rules, follow these steps. 1. Add 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 rule** to save the rule or **Save rule and exit** to save the rule and go back to the Alerting page. - -{{% docs/reference %}} -[annotation-label]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/annotation-label" -[annotation-label]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label" - -[configure-grafana]: "/docs/grafana/ -> /docs/grafana//setup-grafana/configure-grafana" -[configure-grafana]: "/docs/grafana-cloud/ -> /docs/grafana//setup-grafana/configure-grafana" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-rule.md b/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-rule.md index ee27bbde454..5dc9d12be95 100644 --- a/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-rule.md +++ b/docs/sources/alerting/alerting-rules/create-mimir-loki-managed-rule.md @@ -18,6 +18,17 @@ labels: - oss title: Configure data source-managed alert rules weight: 200 +refs: + alerting: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/ + annotation-label: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/annotation-label/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/ --- # Configure data source-managed alert rules @@ -102,33 +113,25 @@ All alert rules and instances, irrespective of their labels, match the default n ## Add annotations -Add [annotations][annotation-label]. to provide more context on the alert in your alert notifications. +Add [annotations](ref:annotation-label). to provide more context on the alert in your alert notifications. Annotations add metadata to provide more information on the alert in your alert notifications. For example, add a **Summary** annotation to tell you which value caused the alert to fire or which server it happened on. -1. [Optional] Add a summary. +1. Optional: Add a summary. Short summary of what happened and why. -1. [Optional] Add a description. +1. Optional: Add a description. Description of what the alert rule does. -1. [Optional] Add a Runbook URL. +1. Optional: Add a Runbook URL. Webpage where you keep your runbook for the alert -1. [Optional] Add a custom annotation -1. [Optional] Add a dashboard and panel link. +1. Optional: Add a custom annotation +1. Optional: Add a dashboard and panel link. Links alerts to panels in a dashboard. 1. Click **Save rule**. - -{{% docs/reference %}} -[alerting]: "/docs/grafana/ -> /docs/grafana//alerting" -[alerting]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting" - -[annotation-label]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/annotation-label" -[annotation-label]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/alerting-rules/create-notification-policy.md b/docs/sources/alerting/alerting-rules/create-notification-policy.md index 7c439f75a04..e553c0cb54f 100644 --- a/docs/sources/alerting/alerting-rules/create-notification-policy.md +++ b/docs/sources/alerting/alerting-rules/create-notification-policy.md @@ -18,6 +18,12 @@ labels: - oss title: Configure notification policies weight: 420 +refs: + notification-policies: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/notification-policies/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notification-policies/ --- # Configure notification policies @@ -32,7 +38,7 @@ If the **Continue matching subsequent sibling nodes** option is enabled for a ne You can configure Grafana-managed notification policies as well as notification policies for an external Alertmanager data source. -For more information on notification policies, see [fundamentals of Notification Policies][notification-policies]. +For more information on notification policies, see [fundamentals of Notification Policies](ref:notification-policies). ## Edit default notification policy @@ -109,8 +115,3 @@ An example of an alert configuration. - Create specific route for alerts coming from the development cluster with an appropriate contact point. - Create a specific route for alerts with "critical" severity with a more invasive contact point integration, like pager duty notification. - Create specific routes for particular teams that handle their own on-call rotations. - -{{% docs/reference %}} -[notification-policies]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/notification-policies" -[notification-policies]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notification-policies" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall.md b/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall.md index f71e5053036..345ea38a9fe 100644 --- a/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall.md +++ b/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall.md @@ -16,13 +16,29 @@ labels: menuTitle: Grafana OnCall title: Configure Grafana OnCall for Alerting weight: 300 +refs: + oncall-integration: + - pattern: /docs/grafana/ + destination: /docs/oncall/latest/integrations/grafana-alerting/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/oncall/integrations/grafana-alerting/ + create-notification-policy: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-notification-policy/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-notification-policy/ + escalation-chain: + - pattern: /docs/grafana/ + destination: /docs/oncall/latest/configure/escalation-chains-and-routes/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/oncall/configure/escalation-chains-and-routes/ --- ## Configure Grafana OnCall for Alerting Use the Grafana Alerting - Grafana OnCall integration to effortlessly connect alerts generated by Grafana Alerting with Grafana OnCall, where you can then route them according to defined escalation chains and schedules. -You can set up the integration using the Grafana Alerting application or the Grafana OnCall application. For more information on setting it up from the Grafana OnCall application, see [Grafana OnCall documentation][oncall-integration]. +You can set up the integration using the Grafana Alerting application or the Grafana OnCall application. For more information on setting it up from the Grafana OnCall application, see [Grafana OnCall documentation](ref:oncall-integration). ### Before you begin @@ -56,19 +72,8 @@ To set up the Grafana OnCall integration using the Grafana Alerting application, 1. Connect your contact point to a notification policy. For more information on connecting your contact point to a notification policy, see - [Create notification policy][create-notification-policy]. + [Create notification policy](ref:create-notification-policy). 1. To view your integration in the Grafana OnCall application and set up routes and escalation chains, click the Link next to the integration on the Contact points list view page in the **Type** column. - This redirects you to the Grafana OnCall integration page in the Grafana OnCall application. From there, you can add [routes and escalation chains][escalation-chain]. - -{{% docs/reference %}} -[create-notification-policy]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-notification-policy" -[create-notification-policy]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-notification-policy" - -[oncall-integration]: "/docs/grafana/ -> /docs/oncall/latest/integrations/grafana-alerting" -[oncall-integration]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/oncall/integrations/grafana-alerting" - -[escalation-chain]: "/docs/grafana/ -> /docs/oncall/latest/configure/escalation-chains-and-routes" -[escalation-chain]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/oncall/configure/escalation-chains-and-routes" -{{% /docs/reference %}} + This redirects you to the Grafana OnCall integration page in the Grafana OnCall application. From there, you can add [routes and escalation chains](ref:escalation-chain). diff --git a/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-slack.md b/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-slack.md index 0b19f5992b4..2cac20e474c 100644 --- a/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-slack.md +++ b/docs/sources/alerting/alerting-rules/manage-contact-points/integrations/configure-slack.md @@ -14,6 +14,12 @@ labels: menuTitle: Slack title: Configure Slack for Alerting weight: 300 +refs: + nested-policy: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-notification-policy/#add-new-nested-policy + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-notification-policy/#add-new-nested-policy --- ## Configure Slack for Alerting @@ -84,10 +90,4 @@ To add the contact point and integration you created to your default notificatio 1. Click **Update default policy**. **Note:** -If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to Slack. For more information, refer to [Notification policies][nested-policy]. - -{{% docs/reference %}} -[nested-policy]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-notification-policy#add-new-nested-policy" - -[nested-policy]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-notification-policy#add-new-nested-policy" -{{% /docs/reference %}} +If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to Slack. For more information, refer to [Notification policies](ref:nested-policy). diff --git a/docs/sources/alerting/fundamentals/_index.md b/docs/sources/alerting/fundamentals/_index.md index 1f86d0dc95e..c0dc8c922d8 100644 --- a/docs/sources/alerting/fundamentals/_index.md +++ b/docs/sources/alerting/fundamentals/_index.md @@ -12,11 +12,22 @@ labels: menuTitle: Introduction title: Introduction to Alerting weight: 100 +refs: + notification-policies: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/notification-policies/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notification-policies/ + external-alertmanagers: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/configure-alertmanager/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/ --- # Introduction to Alerting -Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly. +Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly. For a hands-on introduction, refer to our [tutorial to get started with Grafana Alerting](http://grafana.com/tutorials/alerting-get-started/). ## Principles @@ -24,7 +35,7 @@ In Prometheus-based alerting systems, you have an alert generator that creates a Grafana Alerting is built on the Prometheus model of designing alerting systems. It has an internal alert generator responsible for scheduling and evaluating alert rules, as well as an internal alert receiver responsible for grouping, inhibiting, silencing, and sending notifications. Grafana doesn’t use Prometheus as its alert generator because Grafana Alerting needs to work with many other data sources in addition to Prometheus. However, it does use Alertmanager as its alert receiver. -Alerts are sent to the alert receiver where they are routed, grouped, inhibited, silenced and notified. In Grafana Alerting, the default alert receiver is the Alertmanager embedded inside Grafana, and is referred to as the Grafana Alertmanager. However, you can use other Alertmanagers too, and these are referred to as [External Alertmanagers][external-alertmanagers]. +Alerts are sent to the alert receiver where they are routed, grouped, inhibited, silenced and notified. In Grafana Alerting, the default alert receiver is the Alertmanager embedded inside Grafana, and is referred to as the Grafana Alertmanager. However, you can use other Alertmanagers too, and these are referred to as [External Alertmanagers](ref:external-alertmanagers). The following diagram gives you an overview of Grafana Alerting and introduces you to some of the fundamental features that are the principles of how Grafana Alerting works. @@ -58,7 +69,7 @@ Notification policies group alerts and then route them to contact points. They d Alerts are matched to notification policies using label matchers. These are human-readable expressions that assert if the alert's labels exactly match, do not exactly match, contain, or do not contain some expected text. For example, the matcher `foo=bar` matches alerts with the label `foo=bar` while the matcher `foo=~[a-zA-Z]+` matches alerts with any label called foo with a value that matches the regular expression `[a-zA-Z]+`. -By default, an alert can only match one notification policy. However, with the `continue` feature alerts can be made to match any number of notification policies at the same time. For more information on notification policies, see [fundamentals of Notification Policies][notification-policies]. +By default, an alert can only match one notification policy. However, with the `continue` feature alerts can be made to match any number of notification policies at the same time. For more information on notification policies, see [fundamentals of Notification Policies](ref:notification-policies). ### Silences and mute timings @@ -67,10 +78,3 @@ Silences and mute timings allow you to pause notifications for specific alerts o ## Provisioning You can create your alerting resources (alert rules, notification policies, and so on) in the Grafana UI; configmaps, files and configuration management systems using file-based provisioning; and in Terraform using API-based provisioning. - -{{% docs/reference %}} -[external-alertmanagers]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/configure-alertmanager" -[external-alertmanagers]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager" -[notification-policies]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/notification-policies" -[notification-policies]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notification-policies" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/fundamentals/alert-rules/_index.md b/docs/sources/alerting/fundamentals/alert-rules/_index.md index a7ed8f0f7a0..9492820d0fc 100644 --- a/docs/sources/alerting/fundamentals/alert-rules/_index.md +++ b/docs/sources/alerting/fundamentals/alert-rules/_index.md @@ -12,6 +12,27 @@ labels: - oss title: Alert rules weight: 130 +refs: + organising-alerts: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/alert-rules/organising-alerts/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/organising-alerts/ + annotation-label: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/annotation-label/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/ + alert-instances: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/alert-rules/alert-instances/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/alert-instances/ + alert-rule-types: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/alert-rules/alert-rule-types/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/alert-rule-types/ --- # Alert rules @@ -22,21 +43,7 @@ While queries and expressions select the data set to evaluate, a condition sets An interval specifies how frequently an alert rule is evaluated. Duration, when configured, indicates how long a condition must be met. The alert rules can also define alerting behavior in the absence of data. -- [Alert rule types][alert-rule-types] -- [Alert instances][alert-instances] -- [Organising alert rules][organising-alerts] -- [Annotation and labels][annotation-label] - -{{% docs/reference %}} -[alert-instances]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/alert-rules/alert-instances" -[alert-instances]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/alert-instances" - -[alert-rule-types]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/alert-rules/alert-rule-types" -[alert-rule-types]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/alert-rule-types" - -[annotation-label]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/annotation-label" -[annotation-label]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label" - -[organising-alerts]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/alert-rules/organising-alerts" -[organising-alerts]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/organising-alerts" -{{% /docs/reference %}} +- [Alert rule types](ref:alert-rule-types) +- [Alert instances](ref:alert-instances) +- [Organising alert rules](ref:organising-alerts) +- [Annotation and labels](ref:annotation-label) diff --git a/docs/sources/alerting/fundamentals/alert-rules/queries-conditions/_index.md b/docs/sources/alerting/fundamentals/alert-rules/queries-conditions/_index.md index c4191ad3844..e29eb2b91a1 100644 --- a/docs/sources/alerting/fundamentals/alert-rules/queries-conditions/_index.md +++ b/docs/sources/alerting/fundamentals/alert-rules/queries-conditions/_index.md @@ -13,13 +13,24 @@ labels: - oss title: Queries and conditions weight: 104 +refs: + data-source-alerting: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/data-source-alerting/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/data-source-alerting/ + query-transform-data: + - pattern: /docs/grafana/ + destination: /docs/grafana//panels-visualizations/query-transform-data/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//panels-visualizations/query-transform-data/ --- # Queries and conditions In Grafana, queries play a vital role in fetching and transforming data from supported data sources, which include databases like MySQL and PostgreSQL, time series databases like Prometheus, InfluxDB and Graphite, and services like Elasticsearch, AWS CloudWatch, Azure Monitor and Google Cloud Monitoring. -For more information on supported data sources, see [Data sources][data-source-alerting]. +For more information on supported data sources, see [Data sources](ref:data-source-alerting). The process of executing a query involves defining the data source, specifying the desired data to retrieve, and applying relevant filters or transformations. Query languages or syntaxes specific to the chosen data source are utilized for constructing these queries. @@ -27,7 +38,7 @@ In Alerting, you define a query to get the data you want to measure and a condit An alert rule consists of one or more queries and expressions that select the data you want to measure. -For more information on queries and expressions, see [Query and transform data][query-transform-data]. +For more information on queries and expressions, see [Query and transform data](ref:query-transform-data). ## Data source queries @@ -147,11 +158,3 @@ For example, if you have an alert for latency with a threshold of 1000ms and the To solve this problem, you can set a (custom) recovery threshold, which basically means having two thresholds instead of one. An alert is triggered when the first threshold is crossed and is resolved only when the second threshold is crossed. For example, you could set a threshold of 1000ms and a recovery threshold of 900ms. This way, an alert rule will only stop firing when it goes under 900ms and flapping is reduced. - -{{% docs/reference %}} -[data-source-alerting]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/data-source-alerting" -[data-source-alerting]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/data-source-alerting" - -[query-transform-data]: "/docs/grafana/ -> /docs/grafana//panels-visualizations/query-transform-data" -[query-transform-data]: "/docs/grafana-cloud/ -> /docs/grafana//panels-visualizations/query-transform-data" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/fundamentals/alert-rules/rule-evaluation/_index.md b/docs/sources/alerting/fundamentals/alert-rules/rule-evaluation/_index.md index c5250a07eb7..deab4aba08a 100644 --- a/docs/sources/alerting/fundamentals/alert-rules/rule-evaluation/_index.md +++ b/docs/sources/alerting/fundamentals/alert-rules/rule-evaluation/_index.md @@ -44,16 +44,16 @@ Imagine you have an alert rule evaluation interval set at every 30 seconds and t Evaluation will occur as follows: -[00:30] First evaluation - condition not met. +[00:30][] First evaluation - condition not met. -[01:00] Second evaluation - condition breached. +[01:00][] Second evaluation - condition breached. Pending counter starts. **Alert starts pending.** -[01:30] Third evaluation - condition breached. Pending counter = 30s. **Pending state.** +[01:30][] Third evaluation - condition breached. Pending counter = 30s. **Pending state.** -[02:00] Fourth evaluation - condition breached. Pending counter = 60s **Pending state.** +[02:00][] Fourth evaluation - condition breached. Pending counter = 60s **Pending state.** -[02:30] Fifth evaluation - condition breached. Pending counter = 90s. **Alert starts firing** +[02:30][] Fifth evaluation - condition breached. Pending counter = 90s. **Alert starts firing** If the alert rule has a condition that needs to be in breach for a certain amount of time before it takes action, then its state changes as follows: diff --git a/docs/sources/alerting/fundamentals/alertmanager.md b/docs/sources/alerting/fundamentals/alertmanager.md index 9bdd9fbb082..89268f12986 100644 --- a/docs/sources/alerting/fundamentals/alertmanager.md +++ b/docs/sources/alerting/fundamentals/alertmanager.md @@ -13,6 +13,12 @@ labels: - oss title: Alertmanager weight: 140 +refs: + configure-alertmanager: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/configure-alertmanager/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/ --- # Alertmanager @@ -51,9 +57,4 @@ If you are provisioning your data source, set the flag `handleGrafanaManagedAler [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/) -[Add an external Alertmanager][configure-alertmanager] - -{{% docs/reference %}} -[configure-alertmanager]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/configure-alertmanager" -[configure-alertmanager]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager" -{{% /docs/reference %}} +[Add an external Alertmanager](ref:configure-alertmanager) diff --git a/docs/sources/alerting/fundamentals/annotation-label/_index.md b/docs/sources/alerting/fundamentals/annotation-label/_index.md index 690902b7cc9..945b7c3ccbc 100644 --- a/docs/sources/alerting/fundamentals/annotation-label/_index.md +++ b/docs/sources/alerting/fundamentals/annotation-label/_index.md @@ -17,6 +17,12 @@ labels: - oss title: Labels and annotations weight: 120 +refs: + variables-label-annotation: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/annotation-label/variables-label-annotation/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/variables-label-annotation/ --- # Labels and annotations @@ -25,7 +31,7 @@ Labels and annotations contain information about an alert. Both labels and annot The main difference between a label and an annotation is that labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert. -For example, consider two high CPU alerts: one for `server1` and another for `server2`. In such an example we might have a label called `server` where the first alert has the label `server="server1"` and the second alert has the label `server="server2"`. However, we might also want to add a description to each alert such as `"The CPU usage for server1 is above 75%."`, where `server1` and `75%` are replaced with the name and CPU usage of the server (please refer to the documentation on [templating labels and annotations][variables-label-annotation] for how to do this). This kind of description would be more suitable as an annotation. +For example, consider two high CPU alerts: one for `server1` and another for `server2`. In such an example we might have a label called `server` where the first alert has the label `server="server1"` and the second alert has the label `server="server2"`. However, we might also want to add a description to each alert such as `"The CPU usage for server1 is above 75%."`, where `server1` and `75%` are replaced with the name and CPU usage of the server (please refer to the documentation on [templating labels and annotations](ref:variables-label-annotation) for how to do this). This kind of description would be more suitable as an annotation. ## Labels @@ -37,7 +43,7 @@ The label set for an alert is a combination of the labels from the datasource, c ### Custom Labels -Custom labels are additional labels from the alert rule. Like annotations, custom labels must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired. Documentation on how to template custom labels can be found [here][variables-label-annotation]. +Custom labels are additional labels from the alert rule. Like annotations, custom labels must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired. Documentation on how to template custom labels can be found [here](ref:variables-label-annotation). When using custom labels with templates it is important to make sure that the label value does not change between consecutive evaluations of the alert rule as this will end up creating large numbers of distinct alerts. However, it is OK for the template to produce different label values for different alerts. For example, do not put the value of the query in a custom label as this will end up creating a new set of alerts each time the value changes. Instead use annotations. @@ -45,9 +51,4 @@ It is also important to make sure that the label set for an alert does not have ## Annotations -Annotations are named pairs that add additional information to existing alerts. There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like custom labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired. If an annotation contains template code, the template is evaluated once when the alert is fired. It is not re-evaluated, even when the alert is resolved. Documentation on how to template annotations can be found [here][variables-label-annotation]. - -{{% docs/reference %}} -[variables-label-annotation]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/annotation-label/variables-label-annotation" -[variables-label-annotation]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/variables-label-annotation" -{{% /docs/reference %}} +Annotations are named pairs that add additional information to existing alerts. There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like custom labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired. If an annotation contains template code, the template is evaluated once when the alert is fired. It is not re-evaluated, even when the alert is resolved. Documentation on how to template annotations can be found [here](ref:variables-label-annotation). diff --git a/docs/sources/alerting/fundamentals/annotation-label/how-to-use-labels.md b/docs/sources/alerting/fundamentals/annotation-label/how-to-use-labels.md index f287f23a7a0..6dd19d4d5f4 100644 --- a/docs/sources/alerting/fundamentals/annotation-label/how-to-use-labels.md +++ b/docs/sources/alerting/fundamentals/annotation-label/how-to-use-labels.md @@ -13,6 +13,17 @@ labels: - oss title: Labels in Grafana Alerting weight: 117 +refs: + unified-alerting-reserved-labels: + - pattern: /docs/grafana/ + destination: /docs/grafana//setup-grafana/configure-grafana/#unified_alertingreserved_labels + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//setup-grafana/configure-grafana/#unified_alertingreserved_labels + alerting-rules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/ --- # Labels in Grafana Alerting @@ -23,7 +34,7 @@ This topic explains why labels are a fundamental component of alerting. - The Alertmanager uses labels to match alerts for silences and alert groups in notification policies. - The alerting UI shows labels for every alert instance generated during evaluation of that rule. - Contact points can access labels to dynamically generate notifications that contain information specific to the alert that is resulting in a notification. -- You can add labels to an [alerting rule][alerting-rules]. Labels are manually configurable, use template functions, and can reference other labels. Labels added to an alerting rule take precedence in the event of a collision between labels (except in the case of [Grafana reserved labels](#grafana-reserved-labels)). +- You can add labels to an [alerting rule](ref:alerting-rules). Labels are manually configurable, use template functions, and can reference other labels. Labels added to an alerting rule take precedence in the event of a collision between labels (except in the case of [Grafana reserved labels](#grafana-reserved-labels)). {{< figure src="/static/img/docs/alerting/unified/rule-edit-details-8-0.png" max-width="550px" caption="Alert details" >}} @@ -45,7 +56,7 @@ Example: A label key/value pair `Alert! 🔔="🔥"` will become `Alert_0x1f514= {{% admonition type="note" %}} Labels prefixed with `grafana_` are reserved by Grafana for special use. If a manually configured label is added beginning with `grafana_` it may be overwritten in case of collision. -To stop the Grafana Alerting engine from adding a reserved label, you can disable it via the `disabled_labels` option in [unified_alerting.reserved_labels][unified-alerting-reserved-labels] configuration. +To stop the Grafana Alerting engine from adding a reserved label, you can disable it via the `disabled_labels` option in [unified_alerting.reserved_labels](ref:unified-alerting-reserved-labels) configuration. {{% /admonition %}} Grafana reserved labels can be used in the same way as manually configured labels. The current list of available reserved labels are: @@ -53,11 +64,3 @@ Grafana reserved labels can be used in the same way as manually configured label | Label | Description | | -------------- | ----------------------------------------- | | grafana_folder | Title of the folder containing the alert. | - -{{% docs/reference %}} -[alerting-rules]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules" -[alerting-rules]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules" - -[unified-alerting-reserved-labels]: "/docs/grafana/ -> /docs/grafana//setup-grafana/configure-grafana#unified_alertingreserved_labels" -[unified-alerting-reserved-labels]: "/docs/grafana-cloud/ -> /docs/grafana//setup-grafana/configure-grafana#unified_alertingreserved_labels" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/fundamentals/annotation-label/variables-label-annotation.md b/docs/sources/alerting/fundamentals/annotation-label/variables-label-annotation.md index c3d67b9eac6..4942ca2afdc 100644 --- a/docs/sources/alerting/fundamentals/annotation-label/variables-label-annotation.md +++ b/docs/sources/alerting/fundamentals/annotation-label/variables-label-annotation.md @@ -14,6 +14,12 @@ labels: - oss title: Templating labels and annotations weight: 117 +refs: + explore: + - pattern: /docs/grafana/ + destination: /docs/grafana//explore/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//explore/ --- # Templating labels and annotations @@ -290,7 +296,7 @@ https://example.com/grafana ### graphLink -The `graphLink` function returns the path to the graphical view in [Explore][explore] for the given expression and data source: +The `graphLink` function returns the path to the graphical view in [Explore](ref:explore) for the given expression and data source: ``` {{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }} @@ -386,7 +392,7 @@ The `pathPrefix` function returns the path of the Grafana server as configured i ### tableLink -The `tableLink` function returns the path to the tabular view in [Explore][explore] for the given expression and data source: +The `tableLink` function returns the path to the tabular view in [Explore](ref:explore) for the given expression and data source: ``` {{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }} @@ -443,8 +449,3 @@ The `reReplaceAll` function replaces text matching the regular expression: ``` example.com:8080 ``` - -{{% docs/reference %}} -[explore]: "/docs/grafana/ -> /docs/grafana//explore" -[explore]: "/docs/grafana-cloud/ -> /docs/grafana//explore" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/fundamentals/data-source-alerting.md b/docs/sources/alerting/fundamentals/data-source-alerting.md index b7471e23f42..acb6e7059e0 100644 --- a/docs/sources/alerting/fundamentals/data-source-alerting.md +++ b/docs/sources/alerting/fundamentals/data-source-alerting.md @@ -8,6 +8,92 @@ labels: - oss title: Data sources and Grafana Alerting weight: 100 +refs: + aws-cloudwatch: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/aws-cloudwatch/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/aws-cloudwatch/ + microsoft-sql-server-(mssql): + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/mssql/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/mssql/ + open-tsdb: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/opentsdb/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/opentsdb/ + mysql: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/mysql/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/mysql/ + jaeger: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/jaeger/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/jaeger/ + postgresql: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/postgres/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/postgres/ + influxdb: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/influxdb/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/influxdb/ + azure-monitor: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/azure-monitor/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/azure-monitor/ + tempo: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/tempo/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/tempo/ + loki: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/loki/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/loki/ + prometheus: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/prometheus/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/prometheus/ + elasticsearch: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/elasticsearch/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/elasticsearch/ + grafana-data-sources: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/ + graphite: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/graphite/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/graphite/ + testdata: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/testdata/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/testdata/ + google-cloud-monitoring: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/google-cloud-monitoring/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/google-cloud-monitoring/ + zipkin: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/zipkin/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/zipkin/ --- # Data sources and Grafana Alerting @@ -20,76 +106,23 @@ Specifying `{ "alerting": true, “backend”: true }` in the plugin.json file i These are the data sources that are compatible with and supported by Grafana Alerting. -- [AWS CloudWatch][] -- [Azure Monitor][] -- [Elasticsearch][] -- [Google Cloud Monitoring][] -- [Graphite][] -- [InfluxDB][] -- [Loki][] -- [Microsoft SQL Server (MSSQL)][] -- [MySQL][] -- [Open TSDB][] -- [PostgreSQL][] -- [Prometheus][] -- [Jaeger][] -- [Zipkin][] -- [Tempo][] -- [Testdata][] +- [AWS CloudWatch](ref:aws-cloudwatch) +- [Azure Monitor](ref:azure-monitor) +- [Elasticsearch](ref:elasticsearch) +- [Google Cloud Monitoring](ref:google-cloud-monitoring) +- [Graphite](ref:graphite) +- [InfluxDB](ref:influxdb) +- [Loki](ref:loki) +- [Microsoft SQL Server (MSSQL)]() +- [MySQL](ref:mysql) +- [Open TSDB](ref:open-tsdb) +- [PostgreSQL](ref:postgresql) +- [Prometheus](ref:prometheus) +- [Jaeger](ref:jaeger) +- [Zipkin](ref:zipkin) +- [Tempo](ref:tempo) +- [Testdata](ref:testdata) ## Useful links -- [Grafana data sources][] - -{{% docs/reference %}} -[Grafana data sources]: "/docs/grafana/ -> /docs/grafana//datasources" -[Grafana data sources]: "/docs/grafana-cloud/ -> /docs/grafana//datasources" - -[AWS CloudWatch]: "/docs/grafana/ -> /docs/grafana//datasources/aws-cloudwatch" -[AWS CloudWatch]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/aws-cloudwatch" - -[Azure Monitor]: "/docs/grafana/ -> /docs/grafana//datasources/azure-monitor" -[Azure Monitor]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/azure-monitor" - -[Elasticsearch]: "/docs/grafana/ -> /docs/grafana//datasources/elasticsearch" -[Elasticsearch]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/elasticsearch" - -[Google Cloud Monitoring]: "/docs/grafana/ -> /docs/grafana//datasources/google-cloud-monitoring" -[Google Cloud Monitoring]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/google-cloud-monitoring" - -[Graphite]: "/docs/grafana/ -> /docs/grafana//datasources/graphite" -[Graphite]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/graphite" - -[InfluxDB]: "/docs/grafana/ -> /docs/grafana//datasources/influxdb" -[InfluxDB]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/influxdb" - -[Loki]: "/docs/grafana/ -> /docs/grafana//datasources/loki" -[Loki]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/loki" - -[Microsoft SQL Server (MSSQL)]: "/docs/grafana/ -> /docs/grafana//datasources/mssql" -[Microsoft SQL Server (MSSQL)]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/mssql" - -[MySQL]: "/docs/grafana/ -> /docs/grafana//datasources/mysql" -[MySQL]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/mysql" - -[Open TSDB]: "/docs/grafana/ -> /docs/grafana//datasources/opentsdb" -[Open TSDB]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/opentsdb" - -[PostgreSQL]: "/docs/grafana/ -> /docs/grafana//datasources/postgres" -[PostgreSQL]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/postgres" - -[Prometheus]: "/docs/grafana/ -> /docs/grafana//datasources/prometheus" -[Prometheus]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/prometheus" - -[Jaeger]: "/docs/grafana/ -> /docs/grafana//datasources/jaeger" -[Jaeger]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/jaeger" - -[Zipkin]: "/docs/grafana/ -> /docs/grafana//datasources/zipkin" -[Zipkin]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/zipkin" - -[Tempo]: "/docs/grafana/ -> /docs/grafana//datasources/tempo" -[Tempo]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/tempo" - -[Testdata]: "/docs/grafana/ -> /docs/grafana//datasources/testdata" -[Testdata]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/testdata" -{{% /docs/reference %}} +- [Grafana data sources](ref:grafana-data-sources) diff --git a/docs/sources/alerting/fundamentals/evaluate-grafana-alerts.md b/docs/sources/alerting/fundamentals/evaluate-grafana-alerts.md index 2a5ca6996a2..d678c0e1d4f 100644 --- a/docs/sources/alerting/fundamentals/evaluate-grafana-alerts.md +++ b/docs/sources/alerting/fundamentals/evaluate-grafana-alerts.md @@ -11,6 +11,12 @@ labels: - oss title: Alerting on numeric data weight: 110 +refs: + set-up-grafana-monitoring: + - pattern: /docs/grafana/ + destination: /docs/grafana//setup-grafana/set-up-grafana-monitoring/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//setup-grafana/set-up-grafana-monitoring/ --- # Alerting on numeric data @@ -34,7 +40,7 @@ Grafana managed alerts query the following backend data sources that have alerti ### Metrics from the alerting engine -The alerting engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics][set-up-grafana-monitoring]. +The alerting engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics](ref:set-up-grafana-monitoring). | Metric Name | Type | Description | | ------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- | @@ -106,9 +112,3 @@ When this query is used as the **condition** in an alert rule, then the non-zero | {Host=web1,disk=/etc} | Alerting | | {Host=web2,disk=/var} | Alerting | | {Host=web3,disk=/var} | Normal | - -{{% docs/reference %}} - -[set-up-grafana-monitoring]: "/docs/grafana/ -> /docs/grafana//setup-grafana/set-up-grafana-monitoring" -[set-up-grafana-monitoring]: "/docs/grafana-cloud/ -> /docs/grafana//setup-grafana/set-up-grafana-monitoring" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/fundamentals/high-availability/_index.md b/docs/sources/alerting/fundamentals/high-availability/_index.md index c1d5db933b8..4db1f368df5 100644 --- a/docs/sources/alerting/fundamentals/high-availability/_index.md +++ b/docs/sources/alerting/fundamentals/high-availability/_index.md @@ -17,6 +17,12 @@ labels: - oss title: Alerting high availability weight: 170 +refs: + configure-high-availability: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/configure-high-availability/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-high-availability/ --- # Alerting high availability @@ -31,13 +37,8 @@ While the alert generator evaluates all alert rules on all instances, the alert The Alertmanager uses a gossip protocol to share information about notifications between Grafana instances. It also gossips silences, which means a silence created on one Grafana instance is replicated to all other Grafana instances. Both notifications and silences are persisted to the database periodically, and during graceful shut down. -It is important to make sure that gossiping is configured and tested. You can find the documentation on how to do that [here][configure-high-availability]. +It is important to make sure that gossiping is configured and tested. You can find the documentation on how to do that [here](ref:configure-high-availability). ## Useful links -[Configure alerting high availability][configure-high-availability] - -{{% docs/reference %}} -[configure-high-availability]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/configure-high-availability" -[configure-high-availability]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-high-availability" -{{% /docs/reference %}} +[Configure alerting high availability](ref:configure-high-availability) diff --git a/docs/sources/alerting/fundamentals/notification-policies/notifications.md b/docs/sources/alerting/fundamentals/notification-policies/notifications.md index 0bb333a5eb2..6e3ba38a251 100644 --- a/docs/sources/alerting/fundamentals/notification-policies/notifications.md +++ b/docs/sources/alerting/fundamentals/notification-policies/notifications.md @@ -18,6 +18,12 @@ labels: - oss title: Notification policies weight: 410 +refs: + labels-and-label-matchers: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/annotation-label/labels-and-label-matchers/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/labels-and-label-matchers/ --- # Notification policies @@ -32,7 +38,7 @@ Notification policies are _not_ a list, but rather are structured according to a Each policy consists of a set of label matchers (0 or more) that specify which labels they are or aren't interested in handling. -For more information on label matching, see [how label matching works][labels-and-label-matchers]. +For more information on label matching, see [how label matching works](ref:labels-and-label-matchers). {{% admonition type="note" %}} If you haven't configured any label matchers for your notification policy, your notification policy will match _all_ alert instances. This may prevent child policies from being evaluated unless you have enabled **Continue matching siblings** on the notification policy. @@ -130,8 +136,3 @@ Once the first notification has been sent for a new group of alerts, Grafana sta Repeat interval decides how often notifications are repeated if the group has not changed since the last notification. You can think of these as reminders that some alerts are still firing. Repeat interval is closely related to Group interval, which means your Repeat interval must not only be greater than or equal to Group interval, but also must be a multiple of Group interval. If Repeat interval is not a multiple of Group interval it will be coerced into one. For example, if your Group interval is 5 minutes, and your Repeat interval is 9 minutes, the Repeat interval will be rounded up to the nearest multiple of 5 which is 10 minutes. **Default** 4 hours - -{{% docs/reference %}} -[labels-and-label-matchers]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/annotation-label/labels-and-label-matchers" -[labels-and-label-matchers]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/annotation-label/labels-and-label-matchers" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/manage-notifications/_index.md b/docs/sources/alerting/manage-notifications/_index.md index 1ea9bc24920..5686af06fe7 100644 --- a/docs/sources/alerting/manage-notifications/_index.md +++ b/docs/sources/alerting/manage-notifications/_index.md @@ -13,35 +13,44 @@ labels: menuTitle: Manage title: Manage your alerts weight: 130 +refs: + mute-timings: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/mute-timings/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/mute-timings/ + view-alert-rules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/view-alert-rules/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/view-alert-rules/ + declare-incident-from-firing-alert: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/declare-incident-from-alert/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/declare-incident-from-alert/ + view-state-health: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/view-state-health/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/view-state-health/ + create-silence: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/create-silence/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/create-silence/ --- # Manage your alerts Once you have set up your alert rules, contact points, and notification policies, you can use Grafana Alerting to: -[Create silences][create-silence] +[Create silences](ref:create-silence) -[Create mute timings][mute-timings] +[Create mute timings](ref:mute-timings) -[Declare incidents from firing alerts][declare-incident-from-firing-alert] +[Declare incidents from firing alerts](ref:declare-incident-from-firing-alert) -[View the state and health of alert rules][view-state-health] +[View the state and health of alert rules](ref:view-state-health) -[View and filter alert rules][view-alert-rules] - -{{% docs/reference %}} -[create-silence]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/create-silence" -[create-silence]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/create-silence" - -[declare-incident-from-firing-alert]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/declare-incident-from-alert" -[declare-incident-from-firing-alert]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/declare-incident-from-alert" - -[mute-timings]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/mute-timings" -[mute-timings]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/mute-timings" - -[view-alert-rules]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/view-alert-rules" -[view-alert-rules]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/view-alert-rules" - -[view-state-health]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/view-state-health" -[view-state-health]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/view-state-health" -{{% /docs/reference %}} +[View and filter alert rules](ref:view-alert-rules) diff --git a/docs/sources/alerting/manage-notifications/images-in-notifications.md b/docs/sources/alerting/manage-notifications/images-in-notifications.md index 3559abbc660..8d7c4fb061b 100644 --- a/docs/sources/alerting/manage-notifications/images-in-notifications.md +++ b/docs/sources/alerting/manage-notifications/images-in-notifications.md @@ -13,6 +13,17 @@ labels: - oss title: Use images in notifications weight: 405 +refs: + image-rendering: + - pattern: /docs/grafana/ + destination: /docs/grafana//setup-grafana/image-rendering/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//setup-grafana/image-rendering/ + paths: + - pattern: /docs/grafana/ + destination: /docs/grafana//setup-grafana/configure-grafana/#paths + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//setup-grafana/configure-grafana/#paths --- # Use images in notifications @@ -33,9 +44,9 @@ Refer to the table at the end of this page for a list of contact points and thei ## Requirements -1. To use images in notifications, Grafana must be set up to use [image rendering][image-rendering]. You can either install the image rendering plugin or run it as a remote rendering service. +1. To use images in notifications, Grafana must be set up to use [image rendering](ref:image-rendering). You can either install the image rendering plugin or run it as a remote rendering service. -2. When a screenshot is taken it is saved to the [data][paths] folder, even if Grafana is configured to upload screenshots to a cloud storage service. Grafana must have write-access to this folder otherwise screenshots cannot be saved to disk and an error will be logged for each failed screenshot attempt. +2. When a screenshot is taken it is saved to the [data](ref:paths) folder, even if Grafana is configured to upload screenshots to a cloud storage service. Grafana must have write-access to this folder otherwise screenshots cannot be saved to disk and an error will be logged for each failed screenshot attempt. 3. You should use a cloud storage service unless sending alerts to Discord, Email, Pushover, Slack or Telegram. These integrations support either embedding screenshots in the email or attaching screenshots to the notification, while other integrations must link screenshots uploaded to a cloud storage bucket. If a cloud storage service has been configured then integrations that support both will link screenshots from the cloud storage bucket instead of embedding or attaching screenshots to the notification. @@ -69,7 +80,7 @@ If screenshots should be uploaded to cloud storage then `upload_external_image_s # will be persisted to disk for up to temp_data_lifetime. upload_external_image_storage = false -For more information on image rendering, refer to [image rendering][image-rendering]. +For more information on image rendering, refer to [image rendering](ref:image-rendering). Restart Grafana for the changes to take effect. @@ -137,11 +148,3 @@ For example, if a screenshot could not be taken within the expected time (10 sec - `grafana_screenshot_successes_total` - `grafana_screenshot_upload_failures_total` - `grafana_screenshot_upload_successes_total` - -{{% docs/reference %}} -[image-rendering]: "/docs/grafana/ -> /docs/grafana//setup-grafana/image-rendering" -[image-rendering]: "/docs/grafana-cloud/ -> /docs/grafana//setup-grafana/image-rendering" - -[paths]: "/docs/grafana/ -> /docs/grafana//setup-grafana/configure-grafana#paths" -[paths]: "/docs/grafana-cloud/ -> /docs/grafana//setup-grafana/configure-grafana#paths" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/manage-notifications/mute-timings.md b/docs/sources/alerting/manage-notifications/mute-timings.md index 86c55ef564b..9ccbc846842 100644 --- a/docs/sources/alerting/manage-notifications/mute-timings.md +++ b/docs/sources/alerting/manage-notifications/mute-timings.md @@ -18,6 +18,17 @@ labels: - oss title: Create mute timings weight: 420 +refs: + fundamentals/alertmanager: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/alertmanager/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alertmanager/ + datasources/alertmanager: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/alertmanager/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//datasources/alertmanager/ --- # Create mute timings @@ -26,7 +37,7 @@ A mute timing is a recurring interval of time when no new notifications for a po Similar to silences, mute timings do not prevent alert rules from being evaluated, nor do they stop alert instances from being shown in the user interface. They only prevent notifications from being created. -You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source][datasources/alertmanager]. For more information, refer to [Alertmanager documentation][fundamentals/alertmanager]. +You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source](ref:datasources/alertmanager). For more information, refer to [Alertmanager documentation](ref:fundamentals/alertmanager). ## Mute timings vs silences @@ -79,11 +90,3 @@ If you want to specify an exact duration, specify all the options. For example, - Days of the week: `monday` - Months: `3, 6, 9, 12` - Days of the month: `1:7` - -{{% docs/reference %}} -[datasources/alertmanager]: "/docs/grafana/ -> /docs/grafana//datasources/alertmanager" -[datasources/alertmanager]: "/docs/grafana-cloud/ -> /docs/grafana//datasources/alertmanager" - -[fundamentals/alertmanager]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/alertmanager" -[fundamentals/alertmanager]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alertmanager" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/manage-notifications/template-notifications/_index.md b/docs/sources/alerting/manage-notifications/template-notifications/_index.md index 1a5507f577a..3b581ce403c 100644 --- a/docs/sources/alerting/manage-notifications/template-notifications/_index.md +++ b/docs/sources/alerting/manage-notifications/template-notifications/_index.md @@ -13,6 +13,22 @@ labels: - oss title: Customize notifications weight: 400 +refs: + using-go-templating-language: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/using-go-templating-language/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/using-go-templating-language/ + use-notification-templates: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/use-notification-templates/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/use-notification-templates/ + reference: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/reference/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/reference/ --- # Customize notifications @@ -37,27 +53,16 @@ You cannot use notification templates to: - Customize the data in webhooks, including the fields or structure of the JSON data or send the data in other formats such as XML. - Add or remove HTTP headers in webhooks other than those in the contact point configuration. -[Using Go's templating language][using-go-templating-language] +[Using Go's templating language](ref:using-go-templating-language) Learn how to write the content of your notification templates in Go’s templating language. Create reusable notification templates for your contact points. -[Use notification templates][use-notification-templates] +[Use notification templates](ref:use-notification-templates) Use notification templates to send notifications to your contact points. -[Reference][reference] +[Reference](ref:reference) Data that is available when writing templates. - -{{% docs/reference %}} -[reference]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/reference" -[reference]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/reference" - -[use-notification-templates]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/use-notification-templates" -[use-notification-templates]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/use-notification-templates" - -[using-go-templating-language]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/using-go-templating-language" -[using-go-templating-language]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/using-go-templating-language" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/manage-notifications/template-notifications/create-notification-templates.md b/docs/sources/alerting/manage-notifications/template-notifications/create-notification-templates.md index 947556e4e23..cd125142c52 100644 --- a/docs/sources/alerting/manage-notifications/template-notifications/create-notification-templates.md +++ b/docs/sources/alerting/manage-notifications/template-notifications/create-notification-templates.md @@ -63,7 +63,7 @@ To preview your notification templates: Default data is provided and you can add or edit alert data to it as well as alert instances. You can add alert data directly in the Payload data window itself or click **Select alert instances** or **Add custom alerts**. -1. [Optional] To add alert data from existing alert instances: +1. Optional: To add alert data from existing alert instances: a. Click **Select alert instances**. @@ -71,7 +71,7 @@ To preview your notification templates: c. Click **Confirm** to add the alert instance(s) to the payload. -1. [Optional] To add alert data using the Alert data editor, click **Add custom data:** +1. Optional: To add alert data using the Alert data editor, click **Add custom data:** a. Add annotations, custom labels and/or set a dashboard or a panel. diff --git a/docs/sources/alerting/manage-notifications/template-notifications/use-notification-templates.md b/docs/sources/alerting/manage-notifications/template-notifications/use-notification-templates.md index a2a341e02c0..d2a65024836 100644 --- a/docs/sources/alerting/manage-notifications/template-notifications/use-notification-templates.md +++ b/docs/sources/alerting/manage-notifications/template-notifications/use-notification-templates.md @@ -14,6 +14,17 @@ labels: - oss title: Use notification templates weight: 300 +refs: + using-go-templating-language: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/using-go-templating-language/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/using-go-templating-language/ + create-notification-templates: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/create-notification-templates/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/create-notification-templates/ --- # Use notification templates @@ -30,14 +41,6 @@ In the Contact points tab, you can see a list of your contact points. {{< figure max-width="940px" src="/static/img/docs/alerting/unified/use-notification-template-9-4.png" caption="Use notification template" >}} - For more information on how to write and execute templates, refer to [Using Go's templating language][using-go-templating-language] and [Create notification templates][create-notification-templates]. + For more information on how to write and execute templates, refer to [Using Go's templating language](ref:using-go-templating-language) and [Create notification templates](ref:create-notification-templates). 1. Click **Save contact point**. - -{{% docs/reference %}} -[create-notification-templates]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/create-notification-templates" -[create-notification-templates]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/create-notification-templates" - -[using-go-templating-language]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/using-go-templating-language" -[using-go-templating-language]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/using-go-templating-language" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/manage-notifications/template-notifications/using-go-templating-language.md b/docs/sources/alerting/manage-notifications/template-notifications/using-go-templating-language.md index 2580962b850..203fe602495 100644 --- a/docs/sources/alerting/manage-notifications/template-notifications/using-go-templating-language.md +++ b/docs/sources/alerting/manage-notifications/template-notifications/using-go-templating-language.md @@ -14,6 +14,22 @@ labels: - oss title: Using Go's templating language weight: 100 +refs: + reference: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/reference/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/reference/ + extendeddata: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/reference/#extendeddata + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/reference/#extendeddata + create-notification-templates: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/create-notification-templates/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/create-notification-templates/ --- # Using Go's templating language @@ -24,7 +40,7 @@ Before you start creating your own notification templates, we recommend that you ## Dot -In text/template there is a special cursor called dot, and is written as `.`. You can think of this cursor as a variable whose value changes depending where in the template it is used. For example, at the start of a notification template `.` refers to something called [`ExtendedData`][extendeddata] which contains a number of fields including `Alerts`, `Status`, `GroupLabels`, `CommonLabels`, `CommonAnnotations` and `ExternalURL`. However, dot might refer to something else when used in a range over a list, when used inside a `with`, or when writing feature templates to be used in other templates. You can see examples of this in [Create notification templates][create-notification-templates], and all data and functions in the [Reference][reference]. +In text/template there is a special cursor called dot, and is written as `.`. You can think of this cursor as a variable whose value changes depending where in the template it is used. For example, at the start of a notification template `.` refers to something called [`ExtendedData`](ref:extendeddata) which contains a number of fields including `Alerts`, `Status`, `GroupLabels`, `CommonLabels`, `CommonAnnotations` and `ExternalURL`. However, dot might refer to something else when used in a range over a list, when used inside a `with`, or when writing feature templates to be used in other templates. You can see examples of this in [Create notification templates](ref:create-notification-templates), and all data and functions in the [Reference](ref:reference). ## Opening and closing tags @@ -278,14 +294,3 @@ The indentation and line breaks in the template are now absent from the text: alertname = "Test" grafana_folder = "Test alerts" ``` - -{{% docs/reference %}} -[create-notification-templates]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/create-notification-templates" -[create-notification-templates]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/create-notification-templates" - -[extendeddata]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/reference#extendeddata" -[extendeddata]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/reference#extendeddata" - -[reference]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications/reference" -[reference]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/reference" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/monitor/_index.md b/docs/sources/alerting/monitor/_index.md index 577910d5690..104d4e03046 100644 --- a/docs/sources/alerting/monitor/_index.md +++ b/docs/sources/alerting/monitor/_index.md @@ -29,9 +29,9 @@ Identify which metrics are critical to your monitoring system (i.e. Grafana) and You can use meta-monitoring metrics to understand the health of your alerting system in the following ways: -1. [Optional] Create a dashboard in Grafana that uses this metric in a panel (just like you would for any other kind of metric). -2. [Optional] Create an alert rule in Grafana that checks this metric regularly (just like you would do for any other kind of alert rule). -3. [Optional] Use the Explore module in Grafana. +1. Optional: Create a dashboard in Grafana that uses this metric in a panel (just like you would for any other kind of metric). +2. Optional: Create an alert rule in Grafana that checks this metric regularly (just like you would do for any other kind of alert rule). +3. Optional: Use the Explore module in Grafana. ## Metrics for Grafana-managed alerts diff --git a/docs/sources/alerting/set-up/_index.md b/docs/sources/alerting/set-up/_index.md index 37ec1194491..80854cd27f8 100644 --- a/docs/sources/alerting/set-up/_index.md +++ b/docs/sources/alerting/set-up/_index.md @@ -9,6 +9,32 @@ labels: menuTitle: Set up title: Set up Alerting weight: 110 +refs: + configure-alertmanager: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/configure-alertmanager/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/ + data-source-alerting: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/data-source-alerting/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/data-source-alerting/ + terraform-provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/terraform-provisioning/ + data-source-management: + - pattern: /docs/grafana/ + destination: /docs/grafana//administration/data-source-management/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//administration/data-source-management/ + configure-high-availability: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/configure-high-availability/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-high-availability/ --- # Set up Alerting @@ -21,8 +47,8 @@ These are set-up instructions for Grafana Alerting Open Source. ## Before you begin -- Configure your [data sources][data-source-management] -- Check which data sources are compatible with and supported by [Grafana Alerting][data-source-alerting] +- Configure your [data sources](ref:data-source-management) +- Check which data sources are compatible with and supported by [Grafana Alerting](ref:data-source-alerting) Watch this short video to get started. {{< youtube id="6W8Nu4b_PXM" >}} @@ -39,17 +65,17 @@ To set up Alerting, you need to: - Check the default contact point and update the email address - - [Optional] Add new contact points and integrations + - Optional: Add new contact points and integrations 1. Configure notification policies - Check the default notification policy - - [Optional] Add additional nested policies + - Optional: Add additional nested policies - - [Optional] Add labels and label matchers to control alert routing + - Optional: Add labels and label matchers to control alert routing -1. [Optional] Integrate with [Grafana OnCall](/docs/oncall/latest/integrations/grafana-alerting) +1. Optional: Integrate with [Grafana OnCall](/docs/oncall/latest/integrations/grafana-alerting) ## Advanced set up options @@ -58,23 +84,6 @@ Grafana Alerting supports many additional configuration options, from configurin The following topics provide you with advanced configuration options for Grafana Alerting. - [Provision alert rules using file provisioning](/docs/grafana//alerting/set-up/provision-alerting-resources/file-provisioning) -- [Provision alert rules using Terraform][terraform-provisioning] -- [Add an external Alertmanager][configure-alertmanager] -- [Configure high availability][configure-high-availability] - -{{% docs/reference %}} -[configure-alertmanager]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/configure-alertmanager" -[configure-alertmanager]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager" - -[configure-high-availability]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/configure-high-availability" -[configure-high-availability]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-high-availability" - -[data-source-alerting]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/data-source-alerting" -[data-source-alerting]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/data-source-alerting" - -[data-source-management]: "/docs/grafana/ -> /docs/grafana//administration/data-source-management" -[data-source-management]: "/docs/grafana-cloud/ -> /docs/grafana//administration/data-source-management" - -[terraform-provisioning]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning" -[terraform-provisioning]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/terraform-provisioning" -{{% /docs/reference %}} +- [Provision alert rules using Terraform](ref:terraform-provisioning) +- [Add an external Alertmanager](ref:configure-alertmanager) +- [Configure high availability](ref:configure-high-availability) diff --git a/docs/sources/alerting/set-up/configure-high-availability/_index.md b/docs/sources/alerting/set-up/configure-high-availability/_index.md index d71926d9d9a..9a16e944d89 100644 --- a/docs/sources/alerting/set-up/configure-high-availability/_index.md +++ b/docs/sources/alerting/set-up/configure-high-availability/_index.md @@ -51,10 +51,10 @@ As an alternative to Memberlist, you can use Redis for high availability. This i database for HA and cannot support the meshing of all Grafana servers. 1. Make sure you have a redis server that supports pub/sub. If you use a proxy in front of your redis cluster, make sure the proxy supports pub/sub. -2. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the [unified_alerting] section. +2. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the `[unified_alerting]` section. 3. Set `ha_redis_address` to the redis server address Grafana should connect to. -4. [Optional] Set the username and password if authentication is enabled on the redis server using `ha_redis_username` and `ha_redis_password`. -5. [Optional] Set `ha_redis_prefix` to something unique if you plan to share the redis server with multiple Grafana instances. +4. Optional: Set the username and password if authentication is enabled on the redis server using `ha_redis_username` and `ha_redis_password`. +5. Optional: Set `ha_redis_prefix` to something unique if you plan to share the redis server with multiple Grafana instances. The following metrics can be used for meta monitoring, exposed by Grafana's `/metrics` endpoint: diff --git a/docs/sources/alerting/set-up/migrating-alerts/_index.md b/docs/sources/alerting/set-up/migrating-alerts/_index.md index 147a76197de..41df6004823 100644 --- a/docs/sources/alerting/set-up/migrating-alerts/_index.md +++ b/docs/sources/alerting/set-up/migrating-alerts/_index.md @@ -9,6 +9,17 @@ labels: - oss title: Upgrade Alerting weight: 150 +refs: + alerting_config_error_handling: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling + special_alert: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/fundamentals/alert-rules/state-and-health/#special-alerts-for-nodata-and-error + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/state-and-health/#special-alerts-for-nodata-and-error --- # Upgrade Alerting @@ -204,8 +215,8 @@ When updating your as-code provisioning setup for Grafana Alerting, newly genera 1. `NoData` and `Error` settings are upgraded as is to the corresponding settings in Grafana Alerting, except in two situations: - - As there is no `Keep Last State` option in Grafana Alerting, this option becomes either [`NoData` or `Error`][alerting_config_error_handling]. If using the `Simple Upgrade Method` Grafana automatically creates a 1 year silence for each alert rule with this configuration. If the alert evaluation returns no data or fails (error or timeout), then it creates a [special alert][special_alert], which will be silenced by the silence created during the upgrade. - - Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for [`NoData` or `Error`][alerting_config_error_handling]. In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error. + - As there is no `Keep Last State` option in Grafana Alerting, this option becomes either [`NoData` or `Error`](ref:alerting_config_error_handling). If using the `Simple Upgrade Method` Grafana automatically creates a 1 year silence for each alert rule with this configuration. If the alert evaluation returns no data or fails (error or timeout), then it creates a [special alert](ref:special_alert), which will be silenced by the silence created during the upgrade. + - Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for [`NoData` or `Error`](ref:alerting_config_error_handling). In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error. 1. Notification channels are upgraded to an Alertmanager configuration with the appropriate routes and receivers. @@ -218,11 +229,3 @@ When updating your as-code provisioning setup for Grafana Alerting, newly genera **Limitations** 1. Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically upgraded to Grafana Alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts. - -{{% docs/reference %}} -[alerting_config_error_handling]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-grafana-managed-rule#configure-no-data-and-error-handling" -[alerting_config_error_handling]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-grafana-managed-rule#configure-no-data-and-error-handling" - -[special_alert]: "/docs/grafana/ -> /docs/grafana//alerting/fundamentals/alert-rules/state-and-health#special-alerts-for-nodata-and-error" -[special_alert]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/state-and-health#special-alerts-for-nodata-and-error" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/set-up/migrating-alerts/legacy-alerting-deprecation.md b/docs/sources/alerting/set-up/migrating-alerts/legacy-alerting-deprecation.md index 8d9514acf8a..63574218b74 100644 --- a/docs/sources/alerting/set-up/migrating-alerts/legacy-alerting-deprecation.md +++ b/docs/sources/alerting/set-up/migrating-alerts/legacy-alerting-deprecation.md @@ -12,6 +12,17 @@ labels: - oss title: Legacy alerting deprecation weight: 109 +refs: + migrating-alerts: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/migrating-alerts/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/migrating-alerts/ + angular_deprecation: + - pattern: /docs/grafana/ + destination: /docs/grafana//developers/angular_deprecation/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//developers/angular_deprecation/ --- # Legacy alerting deprecation @@ -26,7 +37,7 @@ Users who are still using legacy alerting are encouraged to migrate their alerts However, we will still patch CVEs until legacy alerting is completely removed in Grafana 11; honoring our commitment to building and distributing secure software. -We have provided [instructions][migrating-alerts] on how to migrate to the new alerting system, making the process as easy as possible for users. +We have provided [instructions](ref:migrating-alerts) on how to migrate to the new alerting system, making the process as easy as possible for users. ## Why are we deprecating legacy alerting? @@ -36,25 +47,17 @@ The new system is based on Prometheus Alertmanager, which offers a more comprehe Overall, the new alerting system in Grafana is a major improvement over the legacy alerting feature, providing users with a more powerful and flexible alerting experience. -Additionally, legacy alerting still requires Angular to function and we are [planning to remove support for it][angular_deprecation] in Grafana 11. +Additionally, legacy alerting still requires Angular to function and we are [planning to remove support for it](ref:angular_deprecation) in Grafana 11. ## When will we remove legacy alerting completely? -Legacy alerting will be removed from the code-base in Grafana 11, following the same timeline as the [Angular deprecation][angular_deprecation]. +Legacy alerting will be removed from the code-base in Grafana 11, following the same timeline as the [Angular deprecation](ref:angular_deprecation). ## How do I migrate to the new Grafana alerting? -Refer to our [upgrade instructions][migrating-alerts]. +Refer to our [upgrade instructions](ref:migrating-alerts). ### Useful links -- [Upgrade Alerting][migrating-alerts] -- [Angular support deprecation][angular_deprecation] - -{{% docs/reference %}} -[angular_deprecation]: "/docs/grafana/ -> /docs/grafana//developers/angular_deprecation" -[angular_deprecation]: "/docs/grafana-cloud/ -> /docs/grafana//developers/angular_deprecation" - -[migrating-alerts]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/migrating-alerts" -[migrating-alerts]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/migrating-alerts" -{{% /docs/reference %}} +- [Upgrade Alerting](ref:migrating-alerts) +- [Angular support deprecation](ref:angular_deprecation) diff --git a/docs/sources/alerting/set-up/provision-alerting-resources/_index.md b/docs/sources/alerting/set-up/provision-alerting-resources/_index.md index 7da5fa634c3..29ab48dd225 100644 --- a/docs/sources/alerting/set-up/provision-alerting-resources/_index.md +++ b/docs/sources/alerting/set-up/provision-alerting-resources/_index.md @@ -16,6 +16,32 @@ labels: - oss title: Provision Alerting resources weight: 300 +refs: + alerting_tf_provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning/ + alerting_export: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/ + alerting_http_provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/ + provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//administration/provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//administration/provisioning/ + alerting_export_http: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-api-endpoints + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-api-endpoints --- # Provision Alerting resources @@ -38,9 +64,9 @@ Choose from the options below to import (or provision) your Grafana Alerting res - Provisioning with configuration files is not available in Grafana Cloud. {{< /admonition >}} -1. Use [Terraform to provision alerting resources][alerting_tf_provisioning]. +1. Use [Terraform to provision alerting resources](ref:alerting_tf_provisioning). -1. Use the [Alerting provisioning HTTP API][alerting_http_provisioning] to manage alerting resources. +1. Use the [Alerting provisioning HTTP API](ref:alerting_http_provisioning) to manage alerting resources. {{< admonition type="note" >}} The JSON output from the majority of Alerting HTTP endpoints isn't compatible for provisioning via configuration files. @@ -52,7 +78,7 @@ Choose from the options below to import (or provision) your Grafana Alerting res You can export both manually created and provisioned alerting resources. You can also edit and export an alert rule without applying the changes. -For detailed instructions on the various export options, refer to [Export alerting resources][alerting_export]. +For detailed instructions on the various export options, refer to [Export alerting resources](ref:alerting_export). ## View provisioned alerting resources @@ -63,18 +89,3 @@ To view your provisioned resources in Grafana, complete the following steps. 1. Click an alerting resource folder, for example, Alert rules. Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually. - -{{% docs/reference %}} -[alerting_tf_provisioning]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning" -[alerting_tf_provisioning]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning" -[alerting_http_provisioning]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning" -[alerting_http_provisioning]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning" -[alerting_export]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources" -[alerting_export]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources" - -[alerting_export_http]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-api-endpoints" -[alerting_export_http]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-api-endpoints" - -[provisioning]: "/docs/grafana/ -> /docs/grafana//administration/provisioning" -[provisioning]: "/docs/grafana-cloud/ -> /docs/grafana//administration/provisioning" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md b/docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md index 212ae9e9f44..7764bdfa195 100644 --- a/docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md +++ b/docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md @@ -16,6 +16,85 @@ labels: - oss title: Export alerting resources weight: 300 +refs: + alerting_http_contactpoints: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#contact-points + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning/#contact-points + alerting_http_notificationpolicies: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#notification-policies + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning/#notification-policies + alerting_tf_provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning/ + export_mute_timings: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timings-exportspan-export-all-mute-timings-in-provisioning-file-format-_routegetmutetimingsexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timings-exportspan-export-all-mute-timings-in-provisioning-file-format-_routegetmutetimingsexport_ + export_rules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rules-exportspan-export-all-alert-rules-in-provisioning-file-format-_routegetalertrulesexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rules-exportspan-export-all-alert-rules-in-provisioning-file-format-_routegetalertrulesexport_ + alerting_http_mutetimings: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#mute-timings + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning/#mute-timings + alerting_http_provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/ + alerting_tf_provisioning_template: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning/#import-contact-points-and-templates + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/terraform-provisioning/#import-contact-points-and-templates + export_rule: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-exportspan-export-an-alert-rule-in-provisioning-file-format-_routegetalertruleexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-exportspan-export-an-alert-rule-in-provisioning-file-format-_routegetalertruleexport_ + alerting_http_alertrules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#alert-rules + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning/#alert-rules + alerting_http_templates: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#templates + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning/#templates + alerting_file_provisioning_template: + - pattern: /docs/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/file-provisioning/#import-templates + export_notifications: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-policy-tree-exportspan-export-the-notification-policy-tree-in-provisioning-file-format-_routegetpolicytreeexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-policy-tree-exportspan-export-the-notification-policy-tree-in-provisioning-file-format-_routegetpolicytreeexport_ + export_rule_group: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-group-exportspan-export-an-alert-rule-group-in-provisioning-file-format-_routegetalertrulegroupexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-group-exportspan-export-an-alert-rule-group-in-provisioning-file-format-_routegetalertrulegroupexport_ + export_contacts: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-contactpoints-exportspan-export-all-contact-points-in-provisioning-file-format-_routegetcontactpointsexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-contactpoints-exportspan-export-all-contact-points-in-provisioning-file-format-_routegetcontactpointsexport_ + export_mute_timing: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timing-exportspan-export-a-mute-timing-in-provisioning-file-format-_routegetmutetimingexport_ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timing-exportspan-export-a-mute-timing-in-provisioning-file-format-_routegetmutetimingexport_ --- # Export alerting resources @@ -36,7 +115,7 @@ If you need to modify provisioned alerting resources in Grafana, refer to [edit ## Export from the Grafana UI -The export options listed below enable you to download resources in YAML, JSON, or Terraform format, facilitating their provisioning through [configuration files](/docs/grafana//alerting/set-up/provision-alerting-resources/file-provisioning) or [Terraform][alerting_tf_provisioning]. +The export options listed below enable you to download resources in YAML, JSON, or Terraform format, facilitating their provisioning through [configuration files](/docs/grafana//alerting/set-up/provision-alerting-resources/file-provisioning) or [Terraform](ref:alerting_tf_provisioning). ### Export alert rules @@ -93,7 +172,7 @@ However, you can export it by manually copying the content template and title di 1. Click **Alerts & IRM** -> **Contact points** -> **Notification templates** tab. 1. Find the template you want to export. 1. Copy the content and title. -1. Adjust it for the [file provisioning format][alerting_file_provisioning_template] or [Terraform resource][alerting_tf_provisioning_template]. +1. Adjust it for the [file provisioning format](ref:alerting_file_provisioning_template) or [Terraform resource](ref:alerting_tf_provisioning_template). ### Export the notification policy tree @@ -129,15 +208,15 @@ To export mute timings from the Grafana UI, complete the following steps. ## HTTP Alerting API -You can use the [Alerting HTTP API][alerting_http_provisioning] to return existing alerting resources in JSON and import them to another Grafana instance using the same endpoint. +You can use the [Alerting HTTP API](ref:alerting_http_provisioning) to return existing alerting resources in JSON and import them to another Grafana instance using the same endpoint. -| Resource | URI | -| -------------------------------------------------------------- | ----------------------------------- | -| [Alert rules][alerting_http_alertrules] | /api/v1/provisioning/alert-rules | -| [Contact points][alerting_http_contactpoints] | /api/v1/provisioning/contact-points | -| [Notification policy tree][alerting_http_notificationpolicies] | /api/v1/provisioning/policies | -| [Mute timings][alerting_http_mutetimings] | /api/v1/provisioning/mute-timings | -| [Templates][alerting_http_templates] | /api/v1/provisioning/templates | +| Resource | URI | +| ------------------------------------------------------------------ | ----------------------------------- | +| [Alert rules](ref:alerting_http_alertrules) | /api/v1/provisioning/alert-rules | +| [Contact points](ref:alerting_http_contactpoints) | /api/v1/provisioning/contact-points | +| [Notification policy tree](ref:alerting_http_notificationpolicies) | /api/v1/provisioning/policies | +| [Mute timings](ref:alerting_http_mutetimings) | /api/v1/provisioning/mute-timings | +| [Templates](ref:alerting_http_templates) | /api/v1/provisioning/templates | However, note the standard endpoints return a JSON format that is not compatible for provisioning through configuration files or Terraform, except the `/export` endpoints listed below. @@ -145,68 +224,19 @@ However, note the standard endpoints return a JSON format that is not compatible The **Alerting HTTP API** provides specific endpoints for exporting alerting resources in YAML or JSON formats, facilitating [provisioning via configuration files][alerting_file_provisioning]. Currently, Terraform format is not supported. -| Resource | Method / URI | Summary | -| ------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| Alert rules | GET /api/v1/provisioning/alert-rules/export | [Export all alert rules in provisioning file format.][export_rules] | -| Alert rules | GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export | [Export an alert rule group in provisioning file format.][export_rule_group] | -| Alert rules | GET /api/v1/provisioning/alert-rules/:uid/export | [Export an alert rule in provisioning file format.][export_rule] | -| Contact points | GET /api/v1/provisioning/contact-points/export | [Export all contact points in provisioning file format.][export_contacts] | -| Notification policy tree | GET /api/v1/provisioning/policies/export | [Export the notification policy tree in provisioning file format.][export_notifications] | -| Mute timings | GET /api/v1/provisioning/mute-timings/export | [Export all mute timings in provisioning file format.][export_mute_timings] | -| Mute timings | GET /api/v1/provisioning/mute-timings/:name/export | [Export a mute timing in provisioning file format.][export_mute_timing] | +| Resource | Method / URI | Summary | +| ------------------------ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| Alert rules | GET /api/v1/provisioning/alert-rules/export | [Export all alert rules in provisioning file format.](ref:export_rules) | +| Alert rules | GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export | [Export an alert rule group in provisioning file format.](ref:export_rule_group) | +| Alert rules | GET /api/v1/provisioning/alert-rules/:uid/export | [Export an alert rule in provisioning file format.](ref:export_rule) | +| Contact points | GET /api/v1/provisioning/contact-points/export | [Export all contact points in provisioning file format.](ref:export_contacts) | +| Notification policy tree | GET /api/v1/provisioning/policies/export | [Export the notification policy tree in provisioning file format.](ref:export_notifications) | +| Mute timings | GET /api/v1/provisioning/mute-timings/export | [Export all mute timings in provisioning file format.](ref:export_mute_timings) | +| Mute timings | GET /api/v1/provisioning/mute-timings/:name/export | [Export a mute timing in provisioning file format.](ref:export_mute_timing) | These endpoints accept a `download` parameter to download a file containing the exported resources. -{{% docs/reference %}} - -[alerting_http_alertrules]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning#alert-rules" -[alerting_http_alertrules]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning#alert-rules" - -[alerting_http_contactpoints]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning#contact-points" -[alerting_http_contactpoints]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning#contact-points" - -[alerting_http_notificationpolicies]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning#notification-policies" -[alerting_http_notificationpolicies]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning#notification-policies" - -[alerting_http_mutetimings]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning#mute-timings" -[alerting_http_mutetimings]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning#mute-timings" - -[alerting_http_templates]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning#templates" -[alerting_http_templates]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/http-api-provisioning#templates" - -[alerting_tf_provisioning]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning" -[alerting_tf_provisioning]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning" - -[alerting_tf_provisioning_template]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/terraform-provisioning#import-contact-points-and-templates" -[alerting_tf_provisioning_template]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/terraform-provisioning#import-contact-points-and-templates" - -[alerting_http_provisioning]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning" -[alerting_http_provisioning]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning" - -[alerting_file_provisioning_template]: "/docs/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/file-provisioning#import-templates" - -[export_rule]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-exportspan-export-an-alert-rule-in-provisioning-file-format-_routegetalertruleexport_" -[export_rule]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-exportspan-export-an-alert-rule-in-provisioning-file-format-_routegetalertruleexport_" - -[export_rule_group]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-group-exportspan-export-an-alert-rule-group-in-provisioning-file-format-_routegetalertrulegroupexport_" -[export_rule_group]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rule-group-exportspan-export-an-alert-rule-group-in-provisioning-file-format-_routegetalertrulegroupexport_" - -[export_rules]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rules-exportspan-export-all-alert-rules-in-provisioning-file-format-_routegetalertrulesexport_" -[export_rules]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-alert-rules-exportspan-export-all-alert-rules-in-provisioning-file-format-_routegetalertrulesexport_" - -[export_contacts]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-contactpoints-exportspan-export-all-contact-points-in-provisioning-file-format-_routegetcontactpointsexport_" -[export_contacts]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-contactpoints-exportspan-export-all-contact-points-in-provisioning-file-format-_routegetcontactpointsexport_" - -[export_mute_timing]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timing-exportspan-export-a-mute-timing-in-provisioning-file-format-_routegetmutetimingexport_" -[export_mute_timing]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timing-exportspan-export-a-mute-timing-in-provisioning-file-format-_routegetmutetimingexport_" - -[export_mute_timings]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timings-exportspan-export-all-mute-timings-in-provisioning-file-format-_routegetmutetimingsexport_" -[export_mute_timings]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-mute-timings-exportspan-export-all-mute-timings-in-provisioning-file-format-_routegetmutetimingsexport_" - -[export_notifications]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-policy-tree-exportspan-export-the-notification-policy-tree-in-provisioning-file-format-_routegetpolicytreeexport_" -[export_notifications]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/#span-idroute-get-policy-tree-exportspan-export-the-notification-policy-tree-in-provisioning-file-format-_routegetpolicytreeexport_" -{{% /docs/reference %}} diff --git a/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md b/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md index 8986febb57c..9b9e058c5ae 100644 --- a/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md +++ b/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md @@ -16,11 +16,46 @@ labels: menuTitle: Use configuration files to provision title: Use configuration files to provision alerting resources weight: 100 +refs: + provisioning: + - pattern: /docs/ + destination: /docs/grafana//administration/provisioning/ + reload-provisioning-configurations: + - pattern: /docs/ + destination: /docs/grafana//developers/http_api/admin/#reload-provisioning-configurations + export_alert_rules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-alert-rules + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-alert-rules + export_templates: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-templates + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-templates + export_contact_points: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-contact-points + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-contact-points + export_policies: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-the-notification-policy-tree + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-the-notification-policy-tree + export_mute_timings: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-mute-timings + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-mute-timings + provisioning_env_vars: + - pattern: /docs/ + destination: /docs/grafana//administration/provisioning/#using-environment-variables --- # Use configuration files to provision alerting resources -Manage your alerting resources using configuration files that can be version controlled. When Grafana starts, it provisions the resources defined in your configuration files. [Provisioning][provisioning] can create, update, or delete existing resources in your Grafana instance. +Manage your alerting resources using configuration files that can be version controlled. When Grafana starts, it provisions the resources defined in your configuration files. [Provisioning](ref:provisioning) can create, update, or delete existing resources in your Grafana instance. This guide outlines the steps and references to provision alerting resources using YAML files. For a practical demo, you can clone and try [this example using Grafana OSS and Docker Compose](https://github.com/grafana/provisioning-alerting-examples/tree/main/config-files). @@ -42,7 +77,7 @@ Details on how to set up the files and which fields are required for each object Create or delete alert rules using provisioning files in your Grafana instance(s). 1. Find the alert rule group in Grafana. -1. [Export][export_alert_rules] and download a provisioning file for your alert rules. +1. [Export](ref:export_alert_rules) and download a provisioning file for your alert rules. 1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to. Example configuration files can be found below. @@ -141,7 +176,7 @@ deleteRules: Create or delete contact points using provisioning files in your Grafana instance(s). 1. Find the contact point in Grafana. -1. [Export][export_contact_points] and download a provisioning file for your contact point. +1. [Export](ref:export_contact_points) and download a provisioning file for your contact point. 1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to. Example configuration files can be found below. @@ -574,7 +609,7 @@ settings: Create or delete templates using provisioning files in your Grafana instance(s). 1. Find the notification template in Grafana. -1. [Export][export_templates] a template by copying the template content and title. +1. [Export](ref:export_templates) a template by copying the template content and title. 1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to. Example configuration files can be found below. @@ -627,7 +662,7 @@ Since the policy tree is a single resource, provisioning it will overwrite a pol {{< /admonition >}} 1. Find the notification policy tree in Grafana. -1. [Export][export_policies] and download a provisioning file for your notification policy tree. +1. [Export](ref:export_policies) and download a provisioning file for your notification policy tree. 1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to. Example configuration files can be found below. @@ -753,7 +788,7 @@ deleteTemplates: Create or delete mute timings via provisioning files using provisioning files in your Grafana instance(s). 1. Find the mute timing in Grafana. -1. [Export][export_mute_timings] and download a provisioning file for your mute timing. +1. [Export](ref:export_mute_timings) and download a provisioning file for your mute timing. 1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to. Example configuration files can be found below. @@ -814,7 +849,7 @@ contactPoints: addresses: $EMAIL ``` -In this example, provisioning replaces `$EMAIL` with the value of the `EMAIL` environment variable or an empty string if it is not present. For more information, refer to [Using environment variables in the Provision documentation][provisioning_env_vars]. +In this example, provisioning replaces `$EMAIL` with the value of the `EMAIL` environment variable or an empty string if it is not present. For more information, refer to [Using environment variables in the Provision documentation](ref:provisioning_env_vars). In alerting resources, most properties support template variable interpolation, with a few exceptions: @@ -838,29 +873,5 @@ For example, when provisioning a `subject` property in a `contactPoints.receiver For more examples on the concept of this guide: - Try provisioning alerting resources in Grafana OSS with YAML files through a demo project using [Docker Compose](https://github.com/grafana/provisioning-alerting-examples/tree/main/config-files) or [Kubernetes deployments](https://github.com/grafana/provisioning-alerting-examples/tree/main/kubernetes). -- Review the distinct options about how Grafana provisions resources in the [Provision Grafana documentation][provisioning]. +- Review the distinct options about how Grafana provisions resources in the [Provision Grafana documentation](ref:provisioning). - For Helm support, review the examples provisioning alerting resources in the [Grafana Helm Chart documentation](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md). - -{{% docs/reference %}} - -[export_alert_rules]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-alert-rules" -[export_alert_rules]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources#export-alert-rules" - -[export_contact_points]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-contact-points" -[export_contact_points]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources#export-contact-points" - -[export_templates]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-templates" -[export_templates]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources#export-templates" - -[export_policies]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-the-notification-policy-tree" -[export_policies]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources#export-the-notification-policy-tree" - -[export_mute_timings]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources#export-mute-timings" -[export_mute_timings]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/export-alerting-resources#export-mute-timings" - -[provisioning]: "/docs/ -> /docs/grafana//administration/provisioning" -[provisioning_env_vars]: "/docs/ -> /docs/grafana//administration/provisioning#using-environment-variables" - -[reload-provisioning-configurations]: "/docs/ -> /docs/grafana//developers/http_api/admin#reload-provisioning-configurations" - -{{% /docs/reference %}} diff --git a/docs/sources/alerting/set-up/provision-alerting-resources/terraform-provisioning/index.md b/docs/sources/alerting/set-up/provision-alerting-resources/terraform-provisioning/index.md index 716d84e1427..a07a2acd823 100644 --- a/docs/sources/alerting/set-up/provision-alerting-resources/terraform-provisioning/index.md +++ b/docs/sources/alerting/set-up/provision-alerting-resources/terraform-provisioning/index.md @@ -17,6 +17,61 @@ labels: menuTitle: Use Terraform to provision title: Use Terraform to provision alerting resources weight: 200 +refs: + notification-policy: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/create-notification-policy/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-notification-policy/ + provision-cloud-with-terraform: + - pattern: /docs/ + destination: /docs/grafana-cloud/developer-resources/infrastructure-as-code/terraform/terraform-cloud-stack/ + notification-template: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/template-notifications/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications/ + mute-timings: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/mute-timings/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/mute-timings/ + alerting_http_provisioning: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning/ + alerting_export: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources/ + testdata: + - pattern: /docs/grafana/ + destination: /docs/grafana//datasources/testdata/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/testdata/ + rbac-role-definitions: + - pattern: /docs/ + destination: /docs/grafana//administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + service-accounts: + - pattern: /docs/grafana/ + destination: /docs/grafana//administration/service-accounts/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana//administration/service-accounts/ + alerting-rules: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/alerting-rules/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/ + rbac-terraform-provisioning: + - pattern: /docs/ + destination: /docs/grafana//administration/roles-and-permissions/access-control/rbac-terraform-provisioning/ + contact-points: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/manage-notifications/manage-contact-points/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/manage-contact-points/ --- # Use Terraform to provision alerting resources @@ -29,7 +84,7 @@ To create and manage your alerting resources using Terraform, you have to comple 1. Create an API key to configure the Terraform provider. 1. Create your alerting resources in Terraform format by - - [exporting configured alerting resources][alerting_export] + - [exporting configured alerting resources](ref:alerting_export) - or writing the [Terraform Alerting schemas](https://registry.terraform.io/providers/grafana/grafana/latest/docs). > By default, you cannot edit provisioned resources. Enable [`disable_provenance` in the Terraform resource](#enable-editing-resources-in-the-grafana-ui) to allow changes in the Grafana UI. 1. Run `terraform apply` to provision your alerting resources. @@ -38,10 +93,10 @@ Before you begin, you should have available a Grafana instance and [Terraform in ## Create an API key and configure the Terraform provider -You can create a [service account token][service-accounts] to authenticate Terraform with Grafana. To create an API key for provisioning alerting resources, complete the following steps. +You can create a [service account token](ref:service-accounts) to authenticate Terraform with Grafana. To create an API key for provisioning alerting resources, complete the following steps. 1. Create a new service account. -1. Assign the role or permission to access the [Alerting provisioning API][alerting_http_provisioning]. +1. Assign the role or permission to access the [Alerting provisioning API](ref:alerting_http_provisioning). 1. Create a new service account token. 1. Name and save the token for use in Terraform. @@ -70,29 +125,29 @@ Replace the following values: This Terraform configuration installs the [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) and authenticates against your Grafana instance using an API token. For other authentication alternatives including basic authentication, refer to the [`auth` option documentation](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication). -For Grafana Cloud, refer to the [instructions to manage a Grafana Cloud stack with Terraform][provision-cloud-with-terraform]. For role-based access control, refer to [Provisioning RBAC with Terraform][rbac-terraform-provisioning] and the [alerting provisioning roles (`fixed:alerting.provisioning.*`)][rbac-role-definitions]. +For Grafana Cloud, refer to the [instructions to manage a Grafana Cloud stack with Terraform](ref:provision-cloud-with-terraform). For role-based access control, refer to [Provisioning RBAC with Terraform](ref:rbac-terraform-provisioning) and the [alerting provisioning roles (`fixed:alerting.provisioning.*`)](ref:rbac-role-definitions). ## Create Terraform configurations for alerting resources [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) enables you to manage the following alerting resources. -| Alerting resource | Terraform resource | -| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| [Alert rules][alerting-rules] | [grafana_rule_group](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group) | -| [Contact points][contact-points] | [grafana_contact_point](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point) | -| [Notification templates][notification-template] | [grafana_message_template](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template) | -| [Notification policy tree][notification-policy] | [grafana_notification_policy](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/notification_policy) | -| [Mute timings][mute-timings] | [grafana_mute_timing](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/mute_timing) | +| Alerting resource | Terraform resource | +| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| [Alert rules](ref:alerting-rules) | [grafana_rule_group](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group) | +| [Contact points](ref:contact-points) | [grafana_contact_point](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point) | +| [Notification templates](ref:notification-template) | [grafana_message_template](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template) | +| [Notification policy tree](ref:notification-policy) | [grafana_notification_policy](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/notification_policy) | +| [Mute timings](ref:mute-timings) | [grafana_mute_timing](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/mute_timing) | In this section, we'll create Terraform configurations for each alerting resource and demonstrate how to link them together. ### Add alert rules -[Alert rules][alerting-rules] enable you to receive alerts by querying any backend Grafana data sources. +[Alert rules](ref:alerting-rules) enable you to receive alerts by querying any backend Grafana data sources. 1. First, create a data source to query and a folder to store your rules in. - In this example, the [TestData][testdata] data source is used. + In this example, the [TestData](ref:testdata) data source is used. ```terraform resource "grafana_data_source" "" { @@ -112,7 +167,7 @@ In this section, we'll create Terraform configurations for each alerting resourc 1. Create or find an alert rule you want to import in Grafana. -1. [Export][alerting_export] the alert rule group in Terraform format. This exports the alert rule group as [`grafana_rule_group` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group). +1. [Export](ref:alerting_export) the alert rule group in Terraform format. This exports the alert rule group as [`grafana_rule_group` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group). You can edit the exported resource, or alternatively, consider creating the resource from scratch. @@ -194,11 +249,11 @@ In this section, we'll create Terraform configurations for each alerting resourc ### Add contact points -[Contact points][contact-points] are the receivers of alert notifications. +[Contact points](ref:contact-points) are the receivers of alert notifications. 1. Create or find the contact points you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below. -1. [Export][alerting_export] the contact point in Terraform format. This exports the contact point as [`grafana_contact_point` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point)—edit it if necessary. +1. [Export](ref:alerting_export) the contact point in Terraform format. This exports the contact point as [`grafana_contact_point` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point)—edit it if necessary. 1. In this example, notifications are muted on weekends. @@ -221,11 +276,11 @@ In this section, we'll create Terraform configurations for each alerting resourc ### Add and enable templates -[Notification templates][notification-template] allow customization of alert notifications across multiple contact points. +[Notification templates](ref:notification-template) allow customization of alert notifications across multiple contact points. 1. Create or find the notification template you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below. -1. [Export][alerting_export] the template as [`grafana_message_template` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template). +1. [Export](ref:alerting_export) the template as [`grafana_message_template` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template). This example is a simple demo template defined as `custom_email.message`. @@ -258,11 +313,11 @@ In this section, we'll create Terraform configurations for each alerting resourc ### Add mute timings -[Mute timings][mute-timings] pause alert notifications during predetermined intervals. +[Mute timings](ref:mute-timings) pause alert notifications during predetermined intervals. 1. Create or find the mute timings you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below. -1. [Export][alerting_export] the mute timing in Terraform format. This exports the mute timing as [`grafana_mute_timing` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/mute_timing)—edit it if necessary. +1. [Export](ref:alerting_export) the mute timing in Terraform format. This exports the mute timing as [`grafana_mute_timing` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/mute_timing)—edit it if necessary. 1. This example turns off notifications on weekends. @@ -284,7 +339,7 @@ In this section, we'll create Terraform configurations for each alerting resourc ### Add the notification policy tree -[Notification policies][notification-policy] defines how to route alert instances to your contact points. +[Notification policies](ref:notification-policy) defines how to route alert instances to your contact points. {{% admonition type="warning" %}} @@ -294,7 +349,7 @@ Since the policy tree is a single resource, provisioning the `grafana_notificati 1. Find the default notification policy tree. Alternatively, consider writing the resource in code as demonstrated in the example below. -1. [Export][alerting_export] the notification policy tree in Terraform format. This exports it as [`grafana_notification_policy` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/notification_policy)—edit it if necessary. +1. [Export](ref:alerting_export) the notification policy tree in Terraform format. This exports it as [`grafana_notification_policy` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/notification_policy)—edit it if necessary. ```terraform resource "grafana_notification_policy" "my_policy_tree" { @@ -384,41 +439,4 @@ For more examples on the concept of this guide: - Try the demo [provisioning alerting resources in Grafana OSS using Terraform and Docker Compose](https://github.com/grafana/provisioning-alerting-examples/tree/main/terraform). - Review all the available options and examples of the Terraform Alerting schemas in the [Grafana Terraform Provider documentation](https://registry.terraform.io/providers/grafana/grafana/latest/docs). -- Review the [tutorial to manage a Grafana Cloud stack using Terraform][provision-cloud-with-terraform]. - -{{% docs/reference %}} - -[alerting-rules]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules" -[alerting-rules]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules" - -[contact-points]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/manage-contact-points" -[contact-points]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/manage-contact-points" - -[mute-timings]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/mute-timings" -[mute-timings]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/mute-timings" - -[notification-policy]: "/docs/grafana/ -> /docs/grafana//alerting/alerting-rules/create-notification-policy" -[notification-policy]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-notification-policy" - -[notification-template]: "/docs/grafana/ -> /docs/grafana//alerting/manage-notifications/template-notifications" -[notification-template]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/template-notifications" - -[alerting_export]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources" -[alerting_export]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/export-alerting-resources" - -[alerting_http_provisioning]: "/docs/grafana/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning" -[alerting_http_provisioning]: "/docs/grafana-cloud/ -> /docs/grafana//alerting/set-up/provision-alerting-resources/http-api-provisioning" - -[service-accounts]: "/docs/grafana/ -> /docs/grafana//administration/service-accounts" -[service-accounts]: "/docs/grafana-cloud/ -> /docs/grafana//administration/service-accounts" - -[testdata]: "/docs/grafana/ -> /docs/grafana//datasources/testdata" -[testdata]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/connect-externally-hosted/data-sources/testdata" - -[provision-cloud-with-terraform]: "/docs/ -> /docs/grafana-cloud/developer-resources/infrastructure-as-code/terraform/terraform-cloud-stack" - -[rbac-role-definitions]: "/docs/ -> /docs/grafana//administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions" - -[rbac-terraform-provisioning]: "/docs/ -> /docs/grafana//administration/roles-and-permissions/access-control/rbac-terraform-provisioning" - -{{% /docs/reference %}} +- Review the [tutorial to manage a Grafana Cloud stack using Terraform](ref:provision-cloud-with-terraform).