Docs: bit of restructuring (#70364)

* Docs: bit of restructuring

* corrects link

* fixes link

* updates

* fixes links

* fixes links

* fixes links

* fixes links

* fixes links
This commit is contained in:
brendamuir 2023-06-20 11:43:12 +02:00 committed by GitHub
parent 87884f4d41
commit d529636bc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 219 additions and 239 deletions

View File

@ -1,14 +1,19 @@
---
menuTitle: Configure
aliases:
- old-alerting/create-alerts/
- rules/
- unified-alerting/alerting-rules/
description: How you can manage your alert rules
title: Manage your alert rules
description: Configure alerting
title: Configure Alerting
weight: 130
---
# Manage your alert rules
# Configure Alerting
Configure the features and integrations that you need to create and manage your alerts.
**Configure alert rules**
An alert rule is a set of evaluation criteria that determines whether an alert will fire. The alert rule consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met.
@ -25,3 +30,11 @@ You can:
Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
Alert rules for an external Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
**Configure contact points**
For information on how to configure contact points, see [Configure contact points]({{< relref "../manage-notifications/manage-contact-points" >}})
**Configure notification policies**
For information on how to configure notification policies, see [Configure notification policies]({{< relref "../manage-notifications/manage-contact-points" >}})

View File

@ -10,11 +10,11 @@ keywords:
- guide
- notification policies
- routes
title: Manage notification policies
title: Configure notification policies
weight: 300
---
# Manage notification policies
# Configure notification policies
Notification policies determine how alerts are routed to contact points.

View File

@ -12,11 +12,11 @@ keywords:
- guide
- contact point
- templating
title: Manage contact points
title: Configure contact points
weight: 200
---
# Manage contact points
# Configure contact points
Use contact points to define how your contacts are notified when an alert rule fires. You can create, edit, delete, and test a contact point.

View File

@ -1,39 +0,0 @@
---
aliases:
- difference-old-new/
- unified-alerting/
- unified-alerting/difference-old-new/
description: Upgrade Grafana alerts
title: Upgrade Alerting
weight: 110
---
# Upgrade Alerting
Grafana Alerting is enabled by default for new installations or existing installations whether or not legacy alerting is configured.
{{% admonition type="note" %}}
When upgrading, your dashboard alerts are migrated to a new format. This migration can be rolled back easily by [opting out]({{< relref "./opt-out" >}}). If you have any questions regarding this migration, please contact us.
{{% /admonition %}}
Existing installations that do not use legacy alerting will have Grafana Alerting enabled by default unless alerting is disabled in the configuration.
Likewise, existing installations that use legacy alerting will be automatically upgraded to Grafana Alerting unless you have [opted out]({{< relref "./opt-out" >}}) of Grafana Alerting before migration takes place. During the upgrade, legacy alerts are migrated to the new alerts type and no alerts or alerting data are lost.
Once the upgrade has taken place, you still have the option to [roll back]({{< relref "./roll-back" >}}) to legacy alerting. However, we do not recommend choosing this option. If you do choose to roll back, Grafana will restore your alerts to the alerts you had at the point in time when the upgrade took place. All new alerts and changes made exclusively in Grafana Alerting will be deleted.
{{% admonition type="note" %}}
Cloud customers, who do not want to upgrade to Grafana Alerting, should contact customer support.
{{% /admonition %}}
If you have opted out or rolled back, you can always choose to [opt in]({{< relref "./opt-in" >}}) to Grafana Alerting at a later point in time.
The following table provides details on the upgrade for Cloud, Enterprise, and OSS installations and the new Grafana Alerting UI.
| Grafana instance upgraded to 9.0 | |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Cloud | Existing Cloud installations with legacy dashboard alerting will have two alerting icons in the left navigation panel - the old alerting plugin icon and the new Grafana Alerting icon. During upgrade, existing alerts from the Cloud alerting plugin are migrated to Grafana Alerting. Once migration is complete, you can access and manage the older alerts from the new alerting Grafana Alerting icon in the navigation panel. The (older) Cloud alerting plugin is uninstalled from your cloud instance. Contact customer support if you **do not wish** to migrate to Grafana Alerting for your Cloud stack. If you choose to use legacy alerting, use the You will see the new Grafana Alerting icon as well as the old Cloud alerting plugin in the left navigation panel. |
| Enterprise | Existing Enterprise instances using legacy alerting will have both the old (marked as legacy) and the new alerting icons in the navigation panel. During upgrade, existing legacy alerts are migrated to Grafana Alerting. If you wish, you can [opt-out]({{< relref "./opt-out" >}}) of Grafana Alerting and roll back to legacy alerting. In that case, you can manage your legacy alerts from the alerting icon marked as legacy. |
| OSS | Existing OSS installations with legacy dashboard alerting will have two alerting icons in the left navigation panel - the old alerting icon (marked as legacy) and the new Grafana Alerting icon. During upgrade, existing legacy alerts are migrated to Grafana Alerting. If you wish, you can [opt-out]({{< relref "./opt-out" >}}) of Grafana Alerting and roll back to legacy alerting. In that case, you can manage your legacy alerts from the alerting icon marked as legacy. |
> **Note:** Starting with v9.0, legacy alerting is deprecated and will be removed in a future release.

View File

@ -1,22 +0,0 @@
---
aliases:
- ../disable-alerting/
- ../unified-alerting/disable-alerting/
description: Disable alerting in Grafana
title: Disable alerting in Grafana
weight: 105
---
# Disable alerting in Grafana
To disable alerting in Grafana entirely (including both legacy and Grafana Alerting), enter the following in your configuration:
```
[alerting]
enabled = false
[unified_alerting]
enabled = false
```
If at any time you want to turn alerting back on, you can opt in.

View File

@ -1,42 +0,0 @@
---
aliases:
- ../migrating-legacy-alerts/
- ../unified-alerting/opt-in/
- differences-and-limitations/
description: Migrate legacy dashboard alerts
title: Differences and limitations
weight: 106
---
# Differences and limitations
There are some differences between Grafana Alerting and legacy dashboard alerts, and a number of features that are no
longer supported. We refer to these as [Differences]({{< relref "#differences" >}}) and [Limitations]({{< relref "#limitations" >}}).
## Differences
1. When Grafana Alerting is enabled or upgraded to Grafana 9.0 or later, existing legacy dashboard alerts migrate in a format compatible with the Grafana Alerting. In the Alerting page of your Grafana instance, you can view the migrated alerts alongside any new alerts.
This topic explains how legacy dashboard alerts are migrated and some limitations of the migration.
2. Read and write access to legacy dashboard alerts and Grafana alerts are governed by the permissions of the folders storing them. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
- If there are dashboard permissions, a folder named `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` is created to match the permissions of the dashboard (including the inherited permissions from the folder).
- If there are no dashboard permissions and the dashboard is in a folder, then the rule is linked to this folder and inherits its permissions.
- If there are no dashboard permissions and the dashboard is in the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
3. `NoData` and `Error` settings are migrated as is to the corresponding settings in Grafana Alerting, except in two situations:
3.1. As there is no `Keep Last State` option for `No Data` in Grafana Alerting, this option becomes `NoData`. The `Keep Last State` option for `Error` is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
3.2. Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for `NoData` and [`Error`](/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md#configure-no-data-and-error-handling). In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error.
4. Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications]({{< relref "../manage-notifications/images-in-notifications" >}}).
6. The JSON format for webhook notifications has changed in Grafana Alerting and uses the format from [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
## Limitations
1. Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana Alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
Silences (expiring after one year) are created for all paused dashboard alerts.

View File

@ -1,24 +0,0 @@
---
aliases:
- ../opt-in/
- ../unified-alerting/opt-in/
description: Opt in to Grafana Alerting
title: Opt in to Grafana Alerting
weight: 104
---
# Opt in to Grafana Alerting
If you have previously disabled alerting in Grafana, or opted out of Grafana Alerting and have decided that you would now like to use Grafana Alerting, you can choose to opt in at any time.
If you have been using legacy alerting up until now your existing alerts will be migrated to the new alerts type and no alerts or alerting data are lost. Even if you choose to opt in to Grafana Alerting, you can roll back to legacy alerting at any time.
To opt in to Grafana Alerting, enter the following in your configuration:
```
[alerting]
enabled = false
[unified_alerting]
enabled = true
```

View File

@ -1,54 +0,0 @@
---
aliases:
- ../opt-in/
- ../unified-alerting/opt-in/
description: Opt out of Grafana Alerting
title: Opt out of Grafana Alerting
weight: 102
---
# Opt out of Grafana Alerting
You can opt out of Grafana Alerting at any time and switch to using legacy alerting. Alternatively, you can opt out of using alerting in its entirety.
## Staying on legacy alerting
When upgrading to Grafana > 9.0, existing installations that use legacy alerting are automatically upgraded to Grafana Alerting unless you have opted-out of Grafana Alerting before migration takes place. During the upgrade, legacy alerts are migrated to the new alerts type and no alerts or alerting data are lost. To keep using legacy alerting and disable Grafana Alerting:
1. Go to your custom configuration file ($WORKING_DIR/conf/custom.ini).
2. Enter the following in your configuration:
```
[alerting]
enabled = true
[unified_alerting]
enabled = false
```
Installations that have been migrated to Grafana Alerting can [roll back]({{< relref "./roll-back" >}}) to legacy alerting at any time.
{{% admonition type="note" %}}
This topic is only relevant for OSS and Enterprise customers. Contact customer support to enable or disable Grafana Alerting for your Grafana Cloud stack.
{{% /admonition %}}
The `ngalert` toggle previously used to enable or disable Grafana Alerting is no longer available.
## Disable alerting
You can disable both Grafana Alerting and legacy alerting in Grafana.
1. Go to your custom configuration file ($WORKING_DIR/conf/custom.ini).
2. Enter the following in your configuration:
```
[alerting]
enabled = false
[unified_alerting]
enabled = false
```
3. Restart Grafana for the configuration changes to take effect.
If you want to turn alerting back on, you can remove both flags to enable Grafana Alerting.

View File

@ -1,28 +0,0 @@
---
aliases:
- ../opt-in/
- ../unified-alerting/roll-back/
description: Roll back to legacy alerting
title: Roll back to legacy alerting
weight: 103
---
# Roll back to legacy alerting
Once the upgrade has taken place, you still have the option to roll back to legacy alerting. If you choose to roll back, Grafana will restore your alerts to the alerts you had at the point in time when the upgrade took place.
All new alerts and changes made exclusively in Grafana Alerting will be deleted.
To roll back to legacy alerting, enter the following in your configuration:
```
force_migration = true
[alerting]
enabled = true
[unified_alerting]
enabled = false
```
> **Note**: We do not recommend this option. If you choose to roll back, Grafana will restore your alerts to the alerts you had at the point in time when the upgrade took place. All new alerts and changes made exclusively in Grafana Alerting will be deleted.

View File

@ -1,23 +1,24 @@
---
menuTitle: Set up
aliases:
- unified-alerting/set-up/
labels:
products:
- oss
description: How to set up alerting features and integrations
description: How to configure alerting features and integrations
title: Set up Alerting
weight: 107
---
# Set up Alerting
Configure the features and integrations that you need to create and manage your alerts.
Set up or upgrade your implementation of Grafana Alerting.
**Note:**
These are set up instructions for Grafana Alerting Open Source.
These are set-up instructions for Grafana Alerting Open Source.
To set up Grafana Alerting for Cloud, see ({{< relref "../set-up-cloud" >}})
To set up Grafana Alerting for Cloud, see ({{< relref "./_index.md" >}})
## Before you begin
@ -47,9 +48,9 @@ To set up Alerting, you need to:
- [Optional] Add labels and label matchers to control alert routing
1. [Optional] Integrate with [Grafana OnCall]
(/docs/oncall/latest/integrations/grafana-alerting/)
(/docs/oncall/latest/integrations/grafana-alerting)
## Advanced set-up options
## Advanced set up options
Grafana Alerting supports many additional configuration options, from configuring external Alertmanagers to routing Grafana-managed alerts outside of Grafana, to defining your alerting setup as code.

View File

@ -0,0 +1,168 @@
---
aliases:
- difference-old-new/
- unified-alerting/
- unified-alerting/difference-old-new/
description: Upgrade Grafana alerts
title: Upgrade Alerting
weight: 150
---
# Upgrade Alerting
Grafana Alerting is enabled by default for new installations or existing installations whether or not legacy alerting is configured.
{{% admonition type="note" %}}
When upgrading, your dashboard alerts are migrated to a new format. This migration can be rolled back easily by opting out. If you have any questions regarding this migration, please contact us.
{{% /admonition %}}
Existing installations that do not use legacy alerting will have Grafana Alerting enabled by default unless alerting is disabled in the configuration.
Likewise, existing installations that use legacy alerting will be automatically upgraded to Grafana Alerting unless you have opted out of Grafana Alerting before migration takes place. During the upgrade, legacy alerts are migrated to the new alerts type and no alerts or alerting data are lost.
Once the upgrade has taken place, you still have the option to roll back to legacy alerting. However, we do not recommend choosing this option. If you do choose to roll back, Grafana will restore your alerts to the alerts you had at the point in time when the upgrade took place. All new alerts and changes made exclusively in Grafana Alerting will be deleted.
{{% admonition type="note" %}}
Cloud customers, who do not want to upgrade to Grafana Alerting, should contact customer support.
{{% /admonition %}}
If you have opted out or rolled back, you can always choose to opt in to Grafana Alerting at a later point in time.
The following table provides details on the upgrade for Cloud, Enterprise, and OSS installations and the new Grafana Alerting UI.
| Grafana instance upgraded to 9.0 | |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Cloud | Existing Cloud installations with legacy dashboard alerting will have two alerting icons in the left navigation panel - the old alerting plugin icon and the new Grafana Alerting icon. During upgrade, existing alerts from the Cloud alerting plugin are migrated to Grafana Alerting. Once migration is complete, you can access and manage the older alerts from the new alerting Grafana Alerting icon in the navigation panel. The (older) Cloud alerting plugin is uninstalled from your cloud instance. Contact customer support if you **do not wish** to migrate to Grafana Alerting for your Cloud stack. If you choose to use legacy alerting, use the You will see the new Grafana Alerting icon as well as the old Cloud alerting plugin in the left navigation panel. |
| Enterprise | Existing Enterprise instances using legacy alerting will have both the old (marked as legacy) and the new alerting icons in the navigation panel. During upgrade, existing legacy alerts are migrated to Grafana Alerting. If you wish, you can opt out of Grafana Alerting and roll back to legacy alerting. In that case, you can manage your legacy alerts from the alerting icon marked as legacy. |
| OSS | Existing OSS installations with legacy dashboard alerting will have two alerting icons in the left navigation panel - the old alerting icon (marked as legacy) and the new Grafana Alerting icon. During upgrade, existing legacy alerts are migrated to Grafana Alerting. If you wish, you can opt out of Grafana Alerting and roll back to legacy alerting. In that case, you can manage your legacy alerts from the alerting icon marked as legacy. |
> **Note:** Starting with v9.0, legacy alerting is deprecated and will be removed in a future release.
## Opt out
You can opt out of Grafana Alerting at any time and switch to using legacy alerting. Alternatively, you can opt out of using alerting in its entirety.
### Stay on legacy alerting
When upgrading to Grafana > 9.0, existing installations that use legacy alerting are automatically upgraded to Grafana Alerting unless you have opted-out of Grafana Alerting before migration takes place. During the upgrade, legacy alerts are migrated to the new alerts type and no alerts or alerting data are lost. To keep using legacy alerting and disable Grafana Alerting:
1. Go to your custom configuration file ($WORKING_DIR/conf/custom.ini).
2. Enter the following in your configuration:
```
[alerting]
enabled = true
[unified_alerting]
enabled = false
```
Installations that have been migrated to Grafana Alerting can roll back to legacy alerting at any time.
{{% admonition type="note" %}}
This topic is only relevant for OSS and Enterprise customers. Contact customer support to enable or disable Grafana Alerting for your Grafana Cloud stack.
{{% /admonition %}}
The `ngalert` toggle previously used to enable or disable Grafana Alerting is no longer available.
### Disable alerting
You can disable both Grafana Alerting and legacy alerting in Grafana.
1. Go to your custom configuration file ($WORKING_DIR/conf/custom.ini).
2. Enter the following in your configuration:
```
[alerting]
enabled = false
[unified_alerting]
enabled = false
```
3. Restart Grafana for the configuration changes to take effect.
If you want to turn alerting back on, you can remove both flags to enable Grafana Alerting.
## Roll back
Once the upgrade has taken place, you still have the option to roll back to legacy alerting. If you choose to roll back, Grafana will restore your alerts to the alerts you had at the point in time when the upgrade took place.
All new alerts and changes made exclusively in Grafana Alerting will be deleted.
To roll back to legacy alerting, enter the following in your configuration:
```
force_migration = true
[alerting]
enabled = true
[unified_alerting]
enabled = false
```
> **Note**: We do not recommend this option. If you choose to roll back, Grafana will restore your alerts to the alerts you had at the point in time when the upgrade took place. All new alerts and changes made exclusively in Grafana Alerting will be deleted.
## Opt in
If you have previously disabled alerting in Grafana, or opted out of Grafana Alerting and have decided that you would now like to use Grafana Alerting, you can choose to opt in at any time.
If you have been using legacy alerting up until now your existing alerts will be migrated to the new alerts type and no alerts or alerting data are lost. Even if you choose to opt in to Grafana Alerting, you can roll back to legacy alerting at any time.
To opt in to Grafana Alerting, enter the following in your configuration:
```
[alerting]
enabled = false
[unified_alerting]
enabled = true
```
## Disable
To disable alerting in Grafana entirely (including both legacy and Grafana Alerting), enter the following in your configuration:
```
[alerting]
enabled = false
[unified_alerting]
enabled = false
```
If at any time you want to turn alerting back on, you can opt in.
## Differences and limitations
There are some differences between Grafana Alerting and legacy dashboard alerts, and a number of features that are no
longer supported.
### Differences
1. When Grafana Alerting is enabled or upgraded to Grafana 9.0 or later, existing legacy dashboard alerts migrate in a format compatible with the Grafana Alerting. In the Alerting page of your Grafana instance, you can view the migrated alerts alongside any new alerts.
This topic explains how legacy dashboard alerts are migrated and some limitations of the migration.
2. Read and write access to legacy dashboard alerts and Grafana alerts are governed by the permissions of the folders storing them. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
- If there are dashboard permissions, a folder named `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` is created to match the permissions of the dashboard (including the inherited permissions from the folder).
- If there are no dashboard permissions and the dashboard is in a folder, then the rule is linked to this folder and inherits its permissions.
- If there are no dashboard permissions and the dashboard is in the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
3. `NoData` and `Error` settings are migrated as is to the corresponding settings in Grafana Alerting, except in two situations:
3.1. As there is no `Keep Last State` option for `No Data` in Grafana Alerting, this option becomes `NoData`. The `Keep Last State` option for `Error` is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
3.2. Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for `NoData` and [`Error`](/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md#configure-no-data-and-error-handling). In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error.
4. Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points.
6. The JSON format for webhook notifications has changed in Grafana Alerting and uses the format from [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
### Limitations
1. Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana Alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
Silences (expiring after one year) are created for all paused dashboard alerts.

View File

@ -1,7 +1,7 @@
---
title: Legacy alerting deprecation
description: Legacy alerting deprecation notice
weight: 107
weight: 109
keywords:
- grafana
- alerting
@ -29,18 +29,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]({{< relref "../../developers/angular_deprecation" >}}) in Grafana 11.
Additionally, legacy alerting still requires Angular to function and we are [planning to remove support for it]({{< relref "../../../developers/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]({{< relref "../../developers/angular_deprecation" >}}).
Legacy alerting will be removed from the code-base in Grafana 11, following the same timeline as the [Angular deprecation]({{< relref "../../../developers/angular_deprecation" >}}).
## How do I migrate to the new Grafana alerting?
Refer to our [migration instructions]({{< relref "./opt-in" >}}).
Refer to our [upgrade instructions]({{< relref "./_index.md" >}}).
### Useful links
- [Upgrade Alerting]({{< relref "./_index.md" >}})
- [Legacy alerting differences and limitations]({{< relref "./_index.md" >}})
- [Angular support deprecation]({{< relref "../../developers/angular_deprecation" >}})
- [Angular support deprecation]({{< relref "../../../developers/angular_deprecation" >}})

View File

@ -11,14 +11,14 @@ aliases:
labels:
products:
- cloud
description: How to set up Alerting for Cloud
description: How to configure Alerting for Cloud
title: Set up Alerting for Cloud
weight: 100
---
# Set up Alerting for Cloud
Configure the features and integrations that you need to create and manage your alerts.
Set up your implementation of Grafana Alerting for Cloud.
Grafana Cloud alerts are directly tied to metrics and log data.
@ -30,7 +30,7 @@ Grafana Cloud Alerting's Prometheus-style alerts are built by querying directly
These are set up instructions for Grafana Alerting Cloud.
To set up Grafana Alerting for Open Source, see ({{< relref "../set-up" >}})
To set up Grafana Alerting for Open Source, see ({{< relref "../set-up/" >}})
To set up Alerting, you need to:
@ -47,11 +47,15 @@ To set up Alerting, you need to:
- [Optional] Add additional nested policies
- [Optional] Add labels and label matchers to control alert routing
4. [Optional] Integrate with [Grafana OnCall](/docs/oncall/latest/integrations/grafana-alerting/) and [Grafana Incident](/docs/grafana-cloud/incident/set-up/)
4. [Optional] Integrate with [Grafana OnCall](/docs/oncall/latest/integrations/grafana-alerting) and [Grafana Incident](/docs/grafana-cloud/incident/set-up)
## Advanced set up options
Grafana Alerting supports many additional configuration options, from configuring external Alertmanagers to routing Grafana-managed alerts outside of Grafana, to defining your alerting setup as code.
The following topics provide you with advanced configuration options for Grafana Alerting for Cloud.
## Provision alert rules using mimirtool
### Provision alert rules using mimirtool
Use `mimirtool` to create and upload alert and recording rules to your Grafana Cloud instance.
@ -71,7 +75,7 @@ The following sections cover all of these concepts:
**Note:** You need an API key with proper permissions. You can use the same API key for your Metric, Log, and Alerting instances.
### Download and install mimirtool
#### Download and install mimirtool
`mimirtool` is a powerful command-line tool for interacting with Grafana Mimir, which powers Grafana Cloud Metrics and Alerts. Use `mimirtool` to upload your metric and log rules definition and the Alertmanager configuration using YAML files.
@ -81,7 +85,7 @@ For more information, including installation instructions, see [Grafana Mimirtoo
For `mimirtool` to interact with Grafana Cloud, you must set the correct configuration variables. Set them using either environment variables or a command line flags.
{{% /admonition %}}
### Upload rules definition to your Grafana Cloud Metrics and Logs instance
#### Upload rules definition to your Grafana Cloud Metrics and Logs instance
First, you'll need to upload your alerting and recording rules to your Metrics and Logs instance. You'll need the instance ID and the URL. These should be part of /orgs/`<yourOrgName>`/.
@ -93,7 +97,7 @@ Your Metrics instance is likely to be in the `us-central1` region. Its address w
Your Logs instance is likely to be in the `us-central1` region. Its address would be in the form of [https://logs-prod-us-central1.grafana.net](https://logs-prod-us-central1.grafana.net).
### Use mimirtool
#### Use mimirtool
With your instance ID, URL, and API key you're now ready to upload your rules to your metrics instance. Use the following commands and files as a reference.
@ -170,13 +174,13 @@ first_rules:
expr: sum by(job) (up)
```
## Add an external Alertmanager using mimirtool
### Add an external Alertmanager using mimirtool
To receive alerts you need to upload your Alertmanager configuration to your Grafana Cloud Alerts instance. Similar to the previous step, you need the corresponding instance ID, URL and API key. These should be part of /orgs/`<yourOrgName>`/.
Your Alerts instance is likely to be in the `us-central1` region. Its address would be in the form of [https://alertmanager-us-central1.grafana.net](https://alertmanager-us-central1.grafana.net).
### Use mimirtool
#### Use mimirtool
With your instance ID, URL, and API key you're now ready to upload your Alertmanager configuration to your Alerts instance. Use the following commands and files as a reference.
@ -238,6 +242,10 @@ $ mimirtool alertmanager delete \
--key=<yourKey>
```
### UI access
#### UI access
After you upload a working Alertmanager configuration file, you can access the Alertmanager UI at: https://alertmanager-us-central1.grafana.net/alertmanager.
### Provision alert rules using Terraform
For information on how to provision alert rule using Terraform, see [Provision alert rules using Terraform]({{< relref "../provision-alerting-resources/terraform-provisioning" >}}).