diff --git a/docs/sources/administration/image_rendering.md b/docs/sources/administration/image_rendering.md index f43f87df99d..cee132a6c7b 100755 --- a/docs/sources/administration/image_rendering.md +++ b/docs/sources/administration/image_rendering.md @@ -7,7 +7,7 @@ weight = 300 # Image rendering -Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}). +Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}). >**Note:** Image rendering of dashboards is not supported at this time. diff --git a/docs/sources/administration/set-up-for-high-availability.md b/docs/sources/administration/set-up-for-high-availability.md index 7a4a2636aa6..2d40ef721d3 100644 --- a/docs/sources/administration/set-up-for-high-availability.md +++ b/docs/sources/administration/set-up-for-high-availability.md @@ -22,7 +22,7 @@ Grafana will now persist all long term data in the database. How to configure th ## Alerting -Currently alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers. +Currently alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers. ## User sessions diff --git a/docs/sources/alerting/_index.md b/docs/sources/alerting/_index.md index bd4e93282cf..db2417aec8b 100644 --- a/docs/sources/alerting/_index.md +++ b/docs/sources/alerting/_index.md @@ -8,21 +8,24 @@ weight = 110 Alerts allow you to know about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services. +> **Note:** In Grafana 8.0, you can optionally choose the beta version of our new [unified altering]({{< relref "./unified-alerting/_index.md" >}}) system. Out of the box, Grafana still supports the [old alters]({{< relref "./old-alerting/_index.md" >}}) . + + Alerts have four main components: - Alert rule - One or more conditions, the frequency of evaluation, and the (optional) duration that a condition must be met before notifying. -- Contact point - A channel for sending notifications when the conditions of an alert rule are met. +- Contact point - A channel for sending notifications when the conditions of an alert rule are met. (Available in unified alerting only.) - Notification policy - A set of matching and grouping criteria used to determine where, and how frequently, to send notifications. -- Silences - Date and matching criteria used to silence notifications. +- Silences - Date and matching criteria used to silence notifications. (Available in unified alerting only.) ## Alert tasks You can perform the following tasks for alerts: -- [Create an alert rule]({{< relref "create-alerts.md" >}}) -- [View existing alert rules and their current state]({{< relref "view-alerts.md" >}}) -- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}}) -- [Add or edit an alert contact point]({{< relref "notifications.md" >}}) +- [Create an alert rule]({{< relref "./old-alerting/create-alerts.md" >}}) +- [View existing alert rules and their current state]({{< relref "./old-alerting/view-alerts.md" >}}) +- [Test alert rules and troubleshoot]({{< relref "./old-alerting/troubleshoot-alerts.md" >}}) +- [Add or edit an alert contact point]({{< relref "./old-alerting/notifications.md" >}}) ## Clustering diff --git a/docs/sources/alerting/difference-old-new.md b/docs/sources/alerting/difference-old-new.md index c3d15851e0f..3d34ca24a3d 100644 --- a/docs/sources/alerting/difference-old-new.md +++ b/docs/sources/alerting/difference-old-new.md @@ -1,11 +1,11 @@ +++ -title = "Difference between new and old alerts" +title = " Difference between unified and old Grafana alerts" description = "Pause an existing alert rule" keywords = ["grafana", "alerting", "guide", "rules", "view"] -weight = 400 +weight = 112 +++ -# Difference between new and old alerts +# Difference between unified and old Grafana alerts The `ngalert` feature toggle enables the beta version of our new alerting system. diff --git a/docs/sources/alerting/old-alerting/_index.md b/docs/sources/alerting/old-alerting/_index.md new file mode 100644 index 00000000000..d7f127896ec --- /dev/null +++ b/docs/sources/alerting/old-alerting/_index.md @@ -0,0 +1,52 @@ ++++ +title = "Old Grafana Alerts" +aliases = ["/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alerting/metrics/"] +weight = 114 ++++ + +# Old Grafana alerts + +Alerts allow you to know about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services. + +Alerts have four main components: + +- Alert rule - One or more conditions, the frequency of evaluation, and the (optional) duration that a condition must be met before notifying. +- Contact point - A channel for sending notifications when the conditions of an alert rule are met. +- Notification policy - A set of matching and grouping criteria used to determine where, and how frequently, to send notifications. +- Silences - Date and matching criteria used to silence notifications. + +## Alert tasks + +You can perform the following tasks for alerts: + +- [Create an alert rule]({{< relref "create-alerts.md" >}}) +- [View existing alert rules and their current state]({{< relref "view-alerts.md" >}}) +- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}}) +- [Add or edit an alert contact point]({{< relref "notifications.md" >}}) + +## Clustering + +Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future. + +## Alert evaluation + +Grafana managed alerts are evaluated by the Grafana backend. Rule evaluations are scheduled, according to the alert rule configuration, and queries are evaluated by an engine that is part of core Grafana. + +Alert rules can only query backend data sources with alerting enabled: +- builtin or developed and maintained by grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`, +`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer` +- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../developers/plugins/metadata.md" >}})) + +## Metrics from the alert engine + +The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../../administration/view-server/internal-metrics.md" >}}). + +Metric Name | Type | Description +---------- | ----------- | ---------- +`alerting.alerts` | gauge | How many alerts by state +`alerting.request_duration_seconds` | histogram | Histogram of requests to the Alerting API +`alerting.active_configurations` | gauge | The number of active, non default alertmanager configurations for grafana managed alerts +`alerting.rule_evaluations_total` | counter | The total number of rule evaluations +`alerting.rule_evaluation_failures_total` | counter | The total number of rule evaluation failures +`alerting.rule_evaluation_duration_seconds` | summary | The duration for a rule to execute +`alerting.rule_group_rules` | gauge | The number of rules diff --git a/docs/sources/alerting/add-notification-template.md b/docs/sources/alerting/old-alerting/add-notification-template.md similarity index 100% rename from docs/sources/alerting/add-notification-template.md rename to docs/sources/alerting/old-alerting/add-notification-template.md diff --git a/docs/sources/alerting/create-alerts.md b/docs/sources/alerting/old-alerting/create-alerts.md similarity index 98% rename from docs/sources/alerting/create-alerts.md rename to docs/sources/alerting/old-alerting/create-alerts.md index d986b1390d3..0e68935c589 100644 --- a/docs/sources/alerting/create-alerts.md +++ b/docs/sources/alerting/old-alerting/create-alerts.md @@ -37,7 +37,7 @@ This section describes the fields you fill out to create an alert. - **Evaluate every -** Specify how often the scheduler should evaluate the alert rule. This is referred to as the _evaluation interval_. - **For -** Specify how long the query needs to violate the configured thresholds before the alert notification triggers. -You can set a minimum evaluation interval in the `alerting.min_interval_seconds` configuration field, to set a minimum time between evaluations. Refer to [Configuration]({{< relref "../administration/configuration.md" >}}#min-interval-seconds) for more information. +You can set a minimum evaluation interval in the `alerting.min_interval_seconds` configuration field, to set a minimum time between evaluations. Refer to [Configuration]({{< relref "../../administration/configuration.md" >}}#min-interval-seconds) for more information. > **Caution:** Do not use `For` with the `If no data or all values are null` setting set to `No Data`. The triggering of `No Data` will trigger instantly and not take `For` into consideration. This may also result in that an OK notification not being sent if alert transitions from `No Data -> Pending -> OK`. diff --git a/docs/sources/alerting/notifications.md b/docs/sources/alerting/old-alerting/notifications.md similarity index 94% rename from docs/sources/alerting/notifications.md rename to docs/sources/alerting/old-alerting/notifications.md index 5550bbce827..e89bf56b8a8 100644 --- a/docs/sources/alerting/notifications.md +++ b/docs/sources/alerting/old-alerting/notifications.md @@ -74,7 +74,7 @@ VictorOps | `victorops` | yes, external only | yes ### Email -To enable email notifications you have to set up [SMTP settings]({{< relref "../administration/configuration/#smtp" >}}) +To enable email notifications you have to set up [SMTP settings]({{< relref "../../administration/configuration/#smtp" >}}) in the Grafana config. Email notifications will upload an image of the alert graph to an external image destination if available or fallback to attaching the image to the email. Be aware that if you use the `local` image storage email servers and clients might not be @@ -252,19 +252,19 @@ Alertmanager handles alerts sent by client applications such as Prometheus serve ## Enable images in notifications {#external-image-store} Grafana can render the panel associated with the alert rule as a PNG image and include that in the notification. Read more about the requirements and how to configure -[image rendering]({{< relref "../administration/image_rendering/" >}}). +[image rendering]({{< relref "../../administration/image_rendering/" >}}). -You must configure an [external image storage provider]({{< relref "../administration/configuration/#external-image-storage" >}}) in order to receive images in alert notifications. If your notification channel requires that the image be publicly accessible (e.g. Slack, PagerDuty), configure a provider which uploads the image to a remote image store like Amazon S3, Webdav, Google Cloud Storage, or Azure Blob Storage. Otherwise, the local provider can be used to serve the image directly from Grafana. +You must configure an [external image storage provider]({{< relref "../../administration/configuration/#external-image-storage" >}}) in order to receive images in alert notifications. If your notification channel requires that the image be publicly accessible (e.g. Slack, PagerDuty), configure a provider which uploads the image to a remote image store like Amazon S3, Webdav, Google Cloud Storage, or Azure Blob Storage. Otherwise, the local provider can be used to serve the image directly from Grafana. Notification services which need public image access are marked as 'external only'. ## Configure the link back to Grafana from alert notifications All alert notifications contain a link back to the triggered alert in the Grafana instance. -This URL is based on the [domain]({{< relref "../administration/configuration/#domain" >}}) setting in Grafana. +This URL is based on the [domain]({{< relref "../../administration/configuration/#domain" >}}) setting in Grafana. ## Notification templating > **Note:** Alert notification templating is only available in Grafana v7.4 and above. -The alert notification template feature allows you to take the [label]({{< relref "../basics/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}). +The alert notification template feature allows you to take the [label]({{< relref "../../basics/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}). diff --git a/docs/sources/alerting/pause-an-alert-rule.md b/docs/sources/alerting/old-alerting/pause-an-alert-rule.md similarity index 100% rename from docs/sources/alerting/pause-an-alert-rule.md rename to docs/sources/alerting/old-alerting/pause-an-alert-rule.md diff --git a/docs/sources/alerting/troubleshoot-alerts.md b/docs/sources/alerting/old-alerting/troubleshoot-alerts.md similarity index 100% rename from docs/sources/alerting/troubleshoot-alerts.md rename to docs/sources/alerting/old-alerting/troubleshoot-alerts.md diff --git a/docs/sources/alerting/view-alerts.md b/docs/sources/alerting/old-alerting/view-alerts.md similarity index 100% rename from docs/sources/alerting/view-alerts.md rename to docs/sources/alerting/old-alerting/view-alerts.md diff --git a/docs/sources/alerting/8.0/_index.md b/docs/sources/alerting/unified-alerting/_index.md similarity index 63% rename from docs/sources/alerting/8.0/_index.md rename to docs/sources/alerting/unified-alerting/_index.md index d517f424354..8283dbcd507 100644 --- a/docs/sources/alerting/8.0/_index.md +++ b/docs/sources/alerting/unified-alerting/_index.md @@ -1,8 +1,11 @@ +++ -title = "Alerts" +title = "Unified Alerts" aliases = ["/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alerting/metrics/"] -weight = 110 +weight = 113 +++ -# Alerts v2.0 overview +# Unified alerts + + + diff --git a/docs/sources/basics/timeseries-dimensions.md b/docs/sources/basics/timeseries-dimensions.md index e8394990a02..5e345e5954f 100644 --- a/docs/sources/basics/timeseries-dimensions.md +++ b/docs/sources/basics/timeseries-dimensions.md @@ -76,7 +76,7 @@ In this case the labels that represent the dimensions will have two keys based o > **Note:** More than one dimension is currently only supported in the Logs queries within the Azure Monitor service as of version 7.1. -> **Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{< relref "../alerting/create-alerts.md#multiple-series" >}}). +> **Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{< relref "../alerting/old-alerting/create-alerts.md#multiple-series" >}}). ### Multiple values diff --git a/docs/sources/developers/plugins/backend/_index.md b/docs/sources/developers/plugins/backend/_index.md index 087859fee5c..392f0047371 100644 --- a/docs/sources/developers/plugins/backend/_index.md +++ b/docs/sources/developers/plugins/backend/_index.md @@ -12,7 +12,7 @@ However, one limitation with these plugins are that they execute on the client-s We use the term _backend plugin_ to denote that a plugin has a backend component. Still, normally a backend plugin requires frontend components as well. This is for example true for backend data source plugins which normally need configuration and query editor components implemented for the frontend. -Data source plugins can be extended with a backend component. In the future we plan to support additional types and possibly new kinds of plugins, such as [notifiers for Grafana Alerting]({{< relref "../../../alerting/notifications.md" >}}) and custom authentication to name a few. +Data source plugins can be extended with a backend component. In the future we plan to support additional types and possibly new kinds of plugins, such as [notifiers for Grafana Alerting]({{< relref "../../../alerting/old-alerting/notifications.md" >}}) and custom authentication to name a few. ## Use cases for implementing a backend plugin diff --git a/docs/sources/getting-started/_index.md b/docs/sources/getting-started/_index.md index 795bda62455..85e4e6fb381 100644 --- a/docs/sources/getting-started/_index.md +++ b/docs/sources/getting-started/_index.md @@ -24,7 +24,7 @@ Refer to [Explore]({{< relref "../explore/_index.md" >}}) for more information. ## Alerts -If you're using Grafana alerting, then you can have alerts sent through a number of different [alert notifiers]({{< relref "../alerting/notifications.md" >}}), including PagerDuty, SMS, email, VictorOps, OpsGenie, or Slack. +If you're using Grafana alerting, then you can have alerts sent through a number of different [alert notifiers]({{< relref "../alerting/old-alerting/notifications.md" >}}), including PagerDuty, SMS, email, VictorOps, OpsGenie, or Slack. Alert hooks allow you to create different notifiers with a bit of code if you prefer some other channels of communication. Visually define [alert rules]({{< relref "../alerting/_index.md" >}}) for your most important metrics. diff --git a/docs/sources/http_api/alerting_notification_channels.md b/docs/sources/http_api/alerting_notification_channels.md index c3225f124a0..77edc08808c 100644 --- a/docs/sources/http_api/alerting_notification_channels.md +++ b/docs/sources/http_api/alerting_notification_channels.md @@ -176,7 +176,7 @@ Content-Type: application/json ## Create notification channel -You can find the full list of [supported notifiers]({{< relref "../alerting/notifications/#list-of-supported-notifiers" >}}) on the alert notifiers page. +You can find the full list of [supported notifiers]({{< relref "../alerting/old-alerting/notifications/#list-of-supported-notifiers" >}}) on the alert notifiers page. `POST /api/alert-notifications` diff --git a/docs/sources/panels/panel-editor.md b/docs/sources/panels/panel-editor.md index a9c5164fe99..be050a75d80 100644 --- a/docs/sources/panels/panel-editor.md +++ b/docs/sources/panels/panel-editor.md @@ -59,7 +59,7 @@ The section contains tabs where you enter queries, transform your data, and crea - **Query tab -** Select your data source and enter queries here. For more information, refer to [Queries]({{< relref "queries.md" >}}). - **Transform tab -** Apply data transformations. For more information, refer to [Transformations]({{< relref "transformations/_index.md" >}}). -- **Alert tab -** Write alert rules. For more information, refer to [Create alerts]({{< relref "../alerting/create-alerts.md" >}}). +- **Alert tab -** Write alert rules. For more information, refer to [Create alerts]({{< relref "../alerting/old-alerting/create-alerts.md" >}}). ### Panel and field options (side pane) diff --git a/docs/sources/shared/alerts/first-step.md b/docs/sources/shared/alerts/first-step.md new file mode 100644 index 00000000000..5102f0eb0c6 --- /dev/null +++ b/docs/sources/shared/alerts/first-step.md @@ -0,0 +1,11 @@ +--- +title: TBD... +--- + +## TBD + +Use the instructions in [Getting started with Grafana]({{< relref "../../getting-started/getting-started.md" >}}) to: + +- Install Grafana. +- Log in to Grafana. +- Create your first dashboard. diff --git a/docs/sources/whatsnew/whats-new-in-v7-4.md b/docs/sources/whatsnew/whats-new-in-v7-4.md index b0dd1e4b3c7..ed76d7cc8bf 100644 --- a/docs/sources/whatsnew/whats-new-in-v7-4.md +++ b/docs/sources/whatsnew/whats-new-in-v7-4.md @@ -107,7 +107,7 @@ You can now provide detailed information to alert notification recipients by inj {{< figure src="/img/docs/alerting/alert-notification-template-7-4.png" max-width="700px" caption="Variable support in alert notifications" >}} -For more information, refer to the [alert notification docs]({{< relref "../alerting/notifications.md#notification-templating" >}}). +For more information, refer to the [alert notification docs]({{< relref "../alerting/old-alerting/notifications.md#notification-templating" >}}). ### Content security policy support