<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Set up Alerting on Grafana Labs</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/</link><description>Recent content in Set up Alerting on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v10.4/alerting/set-up/index.xml" rel="self" type="application/rss+xml"/><item><title>Upgrade Alerting</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/</link><pubDate>Fri, 07 Mar 2025 09:39:42 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/</guid><content><![CDATA[&lt;h1 id=&#34;upgrade-alerting&#34;&gt;Upgrade Alerting&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Legacy alerting will be removed in Grafana v11.0.0. Grafana v10.4 is the last version that offers legacy alerting and the last version of Grafana where automatic alert upgrades will be available.&lt;/p&gt;
&lt;p&gt;Installing Grafana 11 before upgrading your legacy alerts will result in your existing alerts becoming inaccessible or lost.&lt;/p&gt;
&lt;p&gt;For more information, refer to &lt;a href=&#34;/blog/2024/04/04/legacy-alerting-removal-what-you-need-to-know-about-upgrading-to-grafana-alerting/&#34;&gt;Legacy alerting removal: What you need to know about upgrading to Grafana Alerting&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;what-happens-if-i-dont-upgrade-from-legacy-alerting-to-grafana-alerting-before-installing-grafana-11&#34;&gt;What happens if I don’t upgrade from legacy alerting to Grafana Alerting before installing Grafana 11?&lt;/h2&gt;
&lt;p&gt;Attempting to upgrade to Grafana 11 while still having &lt;a href=&#34;#rolling-back-to-legacy-alerting&#34;&gt;legacy alerting explicitly enabled&lt;/a&gt; will result in Grafana not starting and an error message informing you to either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Downgrade to a version prior to Grafana 11 and then upgrade from legacy alerting to Grafana Alerting using one of the below &lt;a href=&#34;#upgrade-methods&#34;&gt;upgrade methods&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Confirm that you don&amp;rsquo;t intend to upgrade your legacy alerts by &lt;a href=&#34;#enable-grafana-alerting&#34;&gt;disabling legacy alerting&lt;/a&gt; (optionally enable Grafana Alerting) in your configuration file.&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Confirming that you don&amp;rsquo;t intend to upgrade your legacy alerts and continuing the Grafana 11 installation may result in your legacy alerts becoming inaccessible or lost.&lt;/p&gt;
&lt;p&gt;Grafana will start with a blank alerting slate and you will need to recreate your alerts from scratch. The below automatic upgrade methods will not be available in Grafana 11.&lt;/p&gt;
&lt;p&gt;As of v11.0, a rolling back to v10.4 will likely restore your legacy alerts. However, this is not guaranteed to always remain the case in future versions.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;upgrade-methods&#34;&gt;Upgrade methods&lt;/h2&gt;
&lt;p&gt;Grafana provides two methods for a seamless automatic upgrade of legacy alert rules and notification channels to Grafana Alerting:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Upgrade with Preview&lt;/strong&gt; (Recommended): Offers a safe and controlled preview environment where you can review and adjust your upgraded alerts before fully enabling Grafana Alerting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simple Upgrade&lt;/strong&gt;: One-step upgrade method for specific needs where a preview environment is not essential.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;key-considerations&#34;&gt;Key Considerations&lt;/h3&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Feature&lt;/th&gt;
              &lt;th&gt;Upgrade with Preview&lt;/th&gt;
              &lt;th&gt;Simple Upgrade&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Safety and Control&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;☑️ Preview environment for review and adjustment&lt;/td&gt;
              &lt;td&gt;❌ No preview, potential for unexpected issues&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;User Experience&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;☑️ Seamless transition by handling issues early&lt;/td&gt;
              &lt;td&gt;❌ Possible disruption during upgrade&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Granular Control&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;☑️ Re-upgrade specific resources after resolving errors&lt;/td&gt;
              &lt;td&gt;❌ All or nothing upgrade, manual error correction&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Stakeholder Involvement&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;☑️ Collaboration and review of adjusted alerts&lt;/td&gt;
              &lt;td&gt;❌ Review only available after upgrade&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Provisioning Support&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;☑️ Configure new as-code before upgrading, simultaneous provisioning&lt;/td&gt;
              &lt;td&gt;❌ No built-in provisioning support&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Simplicity&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;❌ May take longer to complete&lt;/td&gt;
              &lt;td&gt;☑️ Fast, one-step process&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Suited for:&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;☑️ Complex setups, risk-averse environments, collaborative teams, heavy as-code use&lt;/td&gt;
              &lt;td&gt;☑️ Simple setups, testing environments, large fleets&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Grafana v10.3.0 -&amp;gt; v10.4.x&lt;/td&gt;
              &lt;td&gt;Grafana v9.0.0 -&amp;gt; v10.4.x&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;When upgrading with either method, your legacy dashboard alerts and notification channels are copied to a new format. This is non-destructive and can be &lt;a href=&#34;#rolling-back-to-legacy-alerting&#34;&gt;rolled back easily&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;upgrade-with-preview-recommended&#34;&gt;Upgrade with Preview (Recommended)&lt;/h2&gt;
&lt;h3 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Grafana &lt;code&gt;v10.3.0 or later&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Grafana administrator access.&lt;/li&gt;
&lt;li&gt;Enable &lt;code&gt;alertingPreviewUpgrade&lt;/code&gt; &lt;a href=&#34;../../../setup-grafana/configure-grafana/feature-toggles/&#34;&gt;feature toggle&lt;/a&gt; (enabled by default in v10.4.0 or later).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;suited-for&#34;&gt;Suited for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Complex setups&lt;/strong&gt;: Large deployments with intricate alert rules and notification channels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Risk-averse environments&lt;/strong&gt;: Situations where minimizing disruption and ensuring a smooth transition are critical.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collaborative teams&lt;/strong&gt;: Projects where feedback and review from stakeholders are valuable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Heavy as-code use&lt;/strong&gt;: Deployments with large or complex as-code configurations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;overview&#34;&gt;Overview&lt;/h3&gt;
&lt;p&gt;In &lt;strong&gt;Alerts &amp;amp; IRM&lt;/strong&gt;, the &lt;strong&gt;Alerting&lt;/strong&gt; section provides a preview of Grafana Alerting where you can review and modify your upgraded alerts before finalizing the upgrade.&lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;Alerting (legacy) -&amp;gt; Alerting upgrade&lt;/strong&gt; section, you can upgrade your existing alert rules and notification channels, and view a summary of the upgrade to Grafana Alerting.&lt;/p&gt;
&lt;p&gt;Finalize your upgrade by restarting Grafana with the &lt;code&gt;[unified_alerting]&lt;/code&gt; section enabled in your configuration.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Alerts generated by the new alerting system are visible in the &lt;strong&gt;Alerting&lt;/strong&gt; section of the navigation panel but are not active until the upgrade is finalized.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;to-upgrade-with-preview-complete-the-following-steps&#34;&gt;To upgrade with preview, complete the following steps.&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Preview the Upgrade&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Initiate the process&lt;/strong&gt;: Access the upgrade functionality within Grafana by visiting the &lt;strong&gt;Alerting upgrade&lt;/strong&gt; page in the &lt;strong&gt;Alerting (legacy)&lt;/strong&gt; section of the navigation panel. From this page you can upgrade your existing alert rules and notification channels to the new Grafana Alerting system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Review the summary table:&lt;/strong&gt; Review the detailed table outlining how your existing alert rules and notification channels were upgraded to resources in the new Grafana Alerting system.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Investigate and Resolve Errors&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Identify errors&lt;/strong&gt;: Carefully examine the previewed upgrade:
&lt;ul&gt;
&lt;li&gt;Any alert rules or notification channels that couldn&amp;rsquo;t be automatically upgraded will be highlighted with error indicators.&lt;/li&gt;
&lt;li&gt;New or removed alert rules and notification channels will be highlighted with warning indicators.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Address errors&lt;/strong&gt;: You have two options to resolve these issues:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fix legacy issues&lt;/strong&gt;: If possible, address the problems within your legacy alerting setup and attempt to upgrade the specific resource again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create new resources&lt;/strong&gt;: If fixing legacy issues isn&amp;rsquo;t viable, create new alert rules, notification policies, or contact points manually within the new Grafana Alerting system to replace the problematic ones.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update As-Code Setup&lt;/strong&gt; (Optional):
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Export upgraded resources&lt;/strong&gt;: If you use provisioning methods to manage alert rules and notification channels, you can export the upgraded versions to generate provisioning files compatible with Grafana Alerting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test new provisioning definitions&lt;/strong&gt;: Ensure your as-code setup aligns with the new system before completing the upgrade process. Both legacy and Grafana Alerting alerts can be provisioned simultaneously to facilitate a smooth transition.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finalize the Upgrade&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Contact your Grafana server administrator&lt;/strong&gt;: Once you&amp;rsquo;re confident in the state of your previewed upgrade, request to &lt;a href=&#34;#enable-grafana-alerting&#34;&gt;enable Grafana Alerting&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Continued use for upgraded organizations&lt;/strong&gt;: Organizations that have already completed the preview upgrade will seamlessly continue using their configured setup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic upgrade for others&lt;/strong&gt;: Organizations that haven&amp;rsquo;t initiated the upgrade with preview process will undergo the traditional automatic upgrade during this restart.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Address issues before restart&lt;/strong&gt;: Exercise caution, as Grafana will not start if any traditional automatic upgrades encounter errors. Ensure all potential issues are resolved before initiating this step.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;simple-upgrade&#34;&gt;Simple Upgrade&lt;/h2&gt;
&lt;h3 id=&#34;prerequisites-1&#34;&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Grafana &lt;code&gt;v9.0.0 or later&lt;/code&gt; (more recent versions are recommended).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;suited-for-1&#34;&gt;Suited for&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simple setups&lt;/strong&gt;: Limited number of alerts and channels with minimal complexity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Testing environments&lt;/strong&gt;: Where a quick upgrade without a preview is sufficient.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large fleets&lt;/strong&gt;: Where manually reviewing each instance is not feasible.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;overview-1&#34;&gt;Overview&lt;/h3&gt;
&lt;p&gt;While we recommend the &lt;strong&gt;Upgrade with Preview&lt;/strong&gt; method for its enhanced safety and control, the &lt;strong&gt;Simple Upgrade Method&lt;/strong&gt; exists for specific situations where a preview environment is not essential. For example, if you have a large fleet of Grafana instances and want to upgrade them all without the need to review and adjust each one individually.&lt;/p&gt;
&lt;p&gt;Configure your Grafana instance to enable Grafana Alerting and disable legacy alerting. Then restart Grafana to automatically upgrade your existing alert rules and notification channels to the new Grafana Alerting system.&lt;/p&gt;
&lt;p&gt;Once Grafana Alerting is enabled, you can review and adjust your upgraded alerts in the &lt;strong&gt;Alerting&lt;/strong&gt; section of the navigation panel as well as export them for as-code setup.&lt;/p&gt;
&lt;h3 id=&#34;to-perform-the-simple-upgrade-complete-the-following-steps&#34;&gt;To perform the simple upgrade, complete the following steps.&lt;/h3&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Any errors encountered during the upgrade process will fail the upgrade and prevent Grafana from starting. If this occurs, you can &lt;a href=&#34;#rolling-back-to-legacy-alerting&#34;&gt;roll back to legacy alerting&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Upgrade to Grafana Alerting&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Enable Grafana Alerting&lt;/strong&gt;: &lt;a href=&#34;#enable-grafana-alerting&#34;&gt;Modify custom configuration file&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restart Grafana&lt;/strong&gt;: Restart Grafana for the configuration changes to take effect. Grafana will automatically upgrade your existing alert rules and notification channels to the new Grafana Alerting system.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Review and Adjust Upgraded Alerts&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Review the upgraded alerts&lt;/strong&gt;: Go to the &lt;code&gt;Alerting&lt;/code&gt; section of the navigation panel to review the upgraded alerts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Export upgraded resources&lt;/strong&gt;: If you use provisioning methods to manage alert rules and notification channels, you can export the upgraded versions to generate provisioning files compatible with Grafana Alerting.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;additional-information&#34;&gt;Additional Information&lt;/h2&gt;
&lt;h3 id=&#34;enable-grafana-alerting&#34;&gt;Enable Grafana Alerting&lt;/h3&gt;
&lt;p&gt;Go to your custom configuration file ($WORKING_DIR/conf/custom.ini) and enter the following in your configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;toml&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-toml&#34;&gt;[alerting]
enabled = false

[unified_alerting]
enabled = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If you have existing legacy alerts we advise using the &lt;a href=&#34;#upgrade-with-preview-recommended&#34;&gt;Upgrade with Preview&lt;/a&gt; method first to ensure a smooth transition. Any organizations that have not completed the preview upgrade will automatically undergo the simple upgrade during the next restart.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;rolling-back-to-legacy-alerting&#34;&gt;Rolling back to legacy alerting&lt;/h3&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;For Grafana Cloud, contact customer support to enable or disable Grafana Alerting for your stack.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;If you have upgraded to Grafana Alerting and want to roll back to legacy alerting, you can do so by disabling Grafana Alerting and re-enabling legacy alerting.&lt;/p&gt;
&lt;p&gt;Go to your custom configuration file ($WORKING_DIR/conf/custom.ini) and enter the following in your configuration:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;toml&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-toml&#34;&gt;[alerting]
enabled = true

[unified_alerting]
enabled = false&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This action is non-destructive. You can seamlessly switch between legacy alerting and Grafana Alerting at any time without losing any data. However, the upgrade process will only be performed once. If you have opted out of Grafana Alerting and then opt in again, Grafana will not perform the upgrade again.&lt;/p&gt;
&lt;p&gt;If, after rolling back, you wish to delete any existing Grafana Alerting configuration and upgrade your legacy alerting configuration again from scratch, you can enable the &lt;code&gt;clean_upgrade&lt;/code&gt; option:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;toml&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-toml&#34;&gt;[unified_alerting.upgrade]
clean_upgrade = true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;differences-and-limitations&#34;&gt;Differences and limitations&lt;/h3&gt;
&lt;p&gt;There are some differences between Grafana Alerting and legacy dashboard alerts, and a number of features that are no longer supported.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Differences&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Read and write access to legacy dashboard alerts are governed by the dashboard permissions (including the inherited permissions from the folder) while Grafana alerts are governed by the permissions of the folder only. During the upgrade, an alert rule might be moved to a different folder to match the permissions of the dashboard. The following rules apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the inherited dashboard permissions are different from the permissions of the folder, then the rule is moved to a new folder named after the original: &lt;code&gt;&amp;lt;Original folder name&amp;gt; - &amp;lt;Permission Hash&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the inherited dashboard permissions are the same as the permissions of the folder, then the rule is moved to the original folder.&lt;/li&gt;
&lt;li&gt;If the dashboard is in the &lt;code&gt;General&lt;/code&gt; or &lt;code&gt;Dashboards&lt;/code&gt; folder (i.e. no folder), then the rule is moved to a new &lt;code&gt;General Alerting - &amp;lt;Permission Hash&amp;gt;&lt;/code&gt; folder.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;When updating your as-code provisioning setup for Grafana Alerting, newly generated folders will have a different UID from their original.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;NoData&lt;/code&gt; and &lt;code&gt;Error&lt;/code&gt; settings are upgraded as is to the corresponding settings in Grafana Alerting, except in two situations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As there is no &lt;code&gt;Keep Last State&lt;/code&gt; option in Grafana Alerting, this option becomes either 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling&#34;&gt;&lt;code&gt;NoData&lt;/code&gt; or &lt;code&gt;Error&lt;/code&gt;&lt;/a&gt;. If using the &lt;code&gt;Simple Upgrade Method&lt;/code&gt; 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 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/fundamentals/alert-rules/state-and-health/#special-alerts-for-nodata-and-error&#34;&gt;special alert&lt;/a&gt;, which will be silenced by the silence created during the upgrade.&lt;/li&gt;
&lt;li&gt;Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling&#34;&gt;&lt;code&gt;NoData&lt;/code&gt; or &lt;code&gt;Error&lt;/code&gt;&lt;/a&gt;. In this situation, Grafana will use the default setting: &lt;code&gt;NoData&lt;/code&gt; for No data, and &lt;code&gt;Error&lt;/code&gt; for Error.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notification channels are upgraded to an Alertmanager configuration with the appropriate routes and receivers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The JSON format for webhook notifications has changed in Grafana Alerting and uses the format from &lt;a href=&#34;https://prometheus.io/docs/alerting/latest/configuration/#webhook_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Prometheus Alertmanager&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alerting on Prometheus &lt;code&gt;Both&lt;/code&gt; type queries is not supported in Grafana Alerting. Existing legacy alerts with &lt;code&gt;Both&lt;/code&gt; type queries are upgraded to Grafana Alerting as alerts with &lt;code&gt;Range&lt;/code&gt; type queries.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Limitations&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Since &lt;code&gt;Hipchat&lt;/code&gt; and &lt;code&gt;Sensu&lt;/code&gt; 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.&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="upgrade-alerting">Upgrade Alerting&lt;/h1>
&lt;div class="admonition admonition-warning">&lt;blockquote>&lt;p class="title text-uppercase">Warning&lt;/p>&lt;p>Legacy alerting will be removed in Grafana v11.0.0. Grafana v10.4 is the last version that offers legacy alerting and the last version of Grafana where automatic alert upgrades will be available.&lt;/p></description></item><item><title>Add an external Alertmanager</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/configure-alertmanager/</link><pubDate>Wed, 06 Mar 2024 15:13:49 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.4/alerting/set-up/configure-alertmanager/</guid><content><![CDATA[&lt;h1 id=&#34;add-an-external-alertmanager&#34;&gt;Add an external Alertmanager&lt;/h1&gt;
&lt;p&gt;Set up Grafana to use an external Alertmanager as a single Alertmanager to receive all of your alerts. This external Alertmanager can then be configured and administered from within Grafana itself.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Grafana Alerting does not support sending alerts to the AWS Managed Service for Prometheus due to the lack of sigv4 support in Prometheus.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Once you have added the Alertmanager, you can use the Grafana Alerting UI to manage silences, contact points, and notification policies. A drop-down option in these pages allows you to switch between alertmanagers.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Starting with Grafana 9.2, the URL configuration of external alertmanagers from the Admin tab on the Alerting page is deprecated. It will be removed in a future release.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;External alertmanagers should now be configured as data sources using Grafana Configuration from the main Grafana navigation menu. This enables you to manage the contact points and notification policies of external alertmanagers from within Grafana and also encrypts HTTP basic authentication credentials that were previously visible when configuring external alertmanagers by URL.&lt;/p&gt;
&lt;p&gt;To add an external Alertmanager, complete the following steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;Connections&lt;/strong&gt; in the left-side menu.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the Connections page, search for &lt;code&gt;Alertmanager&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click the &lt;strong&gt;Create a new data source&lt;/strong&gt; button.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t see this button, you may need to install the plugin, relaunch your Cloud instance, and then repeat steps 1 and 2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fill out the fields on the page, as required.&lt;/p&gt;
&lt;p&gt;If you are provisioning your data source, set the flag &lt;code&gt;handleGrafanaManagedAlerts&lt;/code&gt; in the &lt;code&gt;jsonData&lt;/code&gt; field to &lt;code&gt;true&lt;/code&gt; to send Grafana-managed alerts to this Alertmanager.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Prometheus, Grafana Mimir, and Cortex implementations of Alertmanager are supported. For Prometheus, contact points and notification policies are read-only in the Grafana Alerting UI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;Save &amp;amp; test&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="add-an-external-alertmanager">Add an external Alertmanager&lt;/h1>
&lt;p>Set up Grafana to use an external Alertmanager as a single Alertmanager to receive all of your alerts. This external Alertmanager can then be configured and administered from within Grafana itself.&lt;/p></description></item><item><title>Provision Alerting resources</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/</link><pubDate>Tue, 21 May 2024 12:43:45 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/</guid><content><![CDATA[&lt;h1 id=&#34;provision-alerting-resources&#34;&gt;Provision Alerting resources&lt;/h1&gt;
&lt;p&gt;Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Importing and exporting (or provisioning) your alerting resources in Grafana Alerting makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.&lt;/p&gt;
&lt;p&gt;You can import alert rules, contact points, notification policies, mute timings, and templates.&lt;/p&gt;
&lt;p&gt;You cannot edit imported alerting resources in the Grafana UI in the same way as alerting resources that were not imported. You can only edit imported contact points, notification policies, templates, and mute timings in the source where they were created. For example, if you manage your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.&lt;/p&gt;
&lt;h2 id=&#34;import-alerting-resources&#34;&gt;Import alerting resources&lt;/h2&gt;
&lt;p&gt;Choose from the options below to import (or provision) your Grafana Alerting resources.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/file-provisioning/&#34;&gt;Use configuration files to provision your alerting resources&lt;/a&gt;, such as alert rules and contact points, through files on disk.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;You cannot edit provisioned resources from files in the Grafana UI.&lt;/li&gt;
&lt;li&gt;Provisioning with configuration files is not available in Grafana Cloud.&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/terraform-provisioning/&#34;&gt;Terraform to provision alerting resources&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/http-api-provisioning/&#34;&gt;Alerting provisioning HTTP API&lt;/a&gt; to manage alerting resources.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The JSON output from the majority of Alerting HTTP endpoints isn&amp;rsquo;t compatible for provisioning via configuration files.&lt;/p&gt;
&lt;p&gt;If you need the alerting resources for file provisioning, use 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/export-alerting-resources/#export-api-endpoints&#34;&gt;Export Alerting endpoints&lt;/a&gt; to return or download them in provisioning format.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;export-alerting-resources&#34;&gt;Export alerting resources&lt;/h2&gt;
&lt;p&gt;You can export both manually created and provisioned alerting resources. You can also edit and export an alert rule without applying the changes.&lt;/p&gt;
&lt;p&gt;For detailed instructions on the various export options, refer to 
    &lt;a href=&#34;/docs/grafana/v10.4/alerting/set-up/provision-alerting-resources/export-alerting-resources/&#34;&gt;Export alerting resources&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;view-provisioned-alerting-resources&#34;&gt;View provisioned alerting resources&lt;/h2&gt;
&lt;p&gt;To view your provisioned resources in Grafana, complete the following steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open your Grafana instance.&lt;/li&gt;
&lt;li&gt;Navigate to Alerting.&lt;/li&gt;
&lt;li&gt;Click an alerting resource folder, for example, Alert rules.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Provisioned resources are labeled &lt;strong&gt;Provisioned&lt;/strong&gt;, so that it is clear that they were not created manually.&lt;/p&gt;
]]></content><description>&lt;h1 id="provision-alerting-resources">Provision Alerting resources&lt;/h1>
&lt;p>Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Importing and exporting (or provisioning) your alerting resources in Grafana Alerting makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.&lt;/p></description></item><item><title>Enable alerting high availability</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/configure-high-availability/</link><pubDate>Tue, 21 May 2024 12:43:45 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.4/alerting/set-up/configure-high-availability/</guid><content><![CDATA[&lt;h1 id=&#34;enable-alerting-high-availability&#34;&gt;Enable alerting high availability&lt;/h1&gt;
&lt;p&gt;You can enable alerting high availability support by updating the Grafana configuration file. If you run Grafana in a Kubernetes cluster, additional steps are required. Both options are described below.
Please note that the deduplication is done for the notification, but the alert will still be evaluated on every Grafana instance. This means that events in alerting state history will be duplicated by the number of Grafana instances running.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If using a mix of &lt;code&gt;execute_alerts=false&lt;/code&gt; and &lt;code&gt;execute_alerts=true&lt;/code&gt; on the HA nodes, since the alert state is not shared amongst the Grafana instances, the instances with &lt;code&gt;execute_alerts=false&lt;/code&gt; will not show any alert status.
This is because the HA settings (&lt;code&gt;ha_peers&lt;/code&gt;, etc), only apply to the alert notification delivery (i.e. de-duplication of alert notifications, and silences, as mentioned above).&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;enable-alerting-high-availability-in-grafana-using-memberlist&#34;&gt;Enable alerting high availability in Grafana using Memberlist&lt;/h2&gt;
&lt;h3 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h3&gt;
&lt;p&gt;Since gossiping of notifications and silences uses both TCP and UDP port &lt;code&gt;9094&lt;/code&gt;, ensure that each Grafana instance is able to accept incoming connections on these ports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To enable high availability support:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the &lt;code&gt;[unified_alerting]&lt;/code&gt; section.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;[ha_peers]&lt;/code&gt; to the number of hosts for each Grafana instance in the cluster (using a format of host:port), for example, &lt;code&gt;ha_peers=10.0.0.5:9094,10.0.0.6:9094,10.0.0.7:9094&lt;/code&gt;.
You must have at least one (1) Grafana instance added to the &lt;code&gt;ha_peers&lt;/code&gt; section.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;[ha_listen_address]&lt;/code&gt; to the instance IP address using a format of &lt;code&gt;host:port&lt;/code&gt; (or the &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Pod&amp;rsquo;s&lt;/a&gt; IP in the case of using Kubernetes).
By default, it is set to listen to all interfaces (&lt;code&gt;0.0.0.0&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;[ha_peer_timeout]&lt;/code&gt; in the &lt;code&gt;[unified_alerting]&lt;/code&gt; section of the custom.ini to specify the time to wait for an instance to send a notification via the Alertmanager. The default value is 15s, but it may increase if Grafana servers are located in different geographic regions or if the network latency between them is high.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;enable-alerting-high-availability-in-grafana-using-redis&#34;&gt;Enable alerting high availability in Grafana using Redis&lt;/h2&gt;
&lt;p&gt;As an alternative to Memberlist, you can use Redis for high availability. This is useful if you want to have a central
database for HA and cannot support the meshing of all Grafana servers.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the &lt;code&gt;[unified_alerting]&lt;/code&gt; section.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;ha_redis_address&lt;/code&gt; to the redis server address Grafana should connect to.&lt;/li&gt;
&lt;li&gt;Optional: Set the username and password if authentication is enabled on the redis server using &lt;code&gt;ha_redis_username&lt;/code&gt; and &lt;code&gt;ha_redis_password&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Optional: Set &lt;code&gt;ha_redis_prefix&lt;/code&gt; to something unique if you plan to share the redis server with multiple Grafana instances.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The following metrics can be used for meta monitoring, exposed by Grafana&amp;rsquo;s &lt;code&gt;/metrics&lt;/code&gt; endpoint:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Metric&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_messages_received_total&lt;/td&gt;
              &lt;td&gt;Total number of cluster messages received.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_messages_received_size_total&lt;/td&gt;
              &lt;td&gt;Total size of cluster messages received.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_messages_sent_total&lt;/td&gt;
              &lt;td&gt;Total number of cluster messages sent.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_messages_sent_size_total&lt;/td&gt;
              &lt;td&gt;Total number of cluster messages received.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_messages_publish_failures_total&lt;/td&gt;
              &lt;td&gt;Total number of messages that failed to be published.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_members&lt;/td&gt;
              &lt;td&gt;Number indicating current number of members in cluster.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_peer_position&lt;/td&gt;
              &lt;td&gt;Position the Alertmanager instance believes it&amp;rsquo;s in. The position determines a peer&amp;rsquo;s behavior in the cluster.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_pings_seconds&lt;/td&gt;
              &lt;td&gt;Histogram of latencies for ping messages.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;alertmanager_cluster_pings_failures_total&lt;/td&gt;
              &lt;td&gt;Total number of failed pings.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;enable-alerting-high-availability-using-kubernetes&#34;&gt;Enable alerting high availability using Kubernetes&lt;/h2&gt;
&lt;p&gt;If you are using Kubernetes, you can expose the pod IP &lt;a href=&#34;https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;through an environment variable&lt;/a&gt; via the container definition.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;env:
  - name: POD_IP
    valueFrom:
      fieldRef:
        fieldPath: status.podIP&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Add the port 9094 to the Grafana deployment:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;ports:
  - containerPort: 3000
    name: http-grafana
    protocol: TCP
  - containerPort: 9094
    name: grafana-alert
    protocol: TCP&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Add the environment variables to the Grafana deployment:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;env:
  - name: POD_IP
    valueFrom:
      fieldRef:
        fieldPath: status.podIP&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Create a headless service that returns the pod IP instead of the service IP, which is what the &lt;code&gt;ha_peers&lt;/code&gt; need:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;apiVersion: v1
kind: Service
metadata:
  name: grafana-alerting
  namespace: grafana
  labels:
    app.kubernetes.io/name: grafana-alerting
    app.kubernetes.io/part-of: grafana
spec:
  type: ClusterIP
  clusterIP: &amp;#39;None&amp;#39;
  ports:
    - port: 9094
  selector:
    app: grafana&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;
&lt;p&gt;Make sure your grafana deployment has the label matching the selector, e.g. &lt;code&gt;app:grafana&lt;/code&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add in the grafana.ini:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;[unified_alerting]
enabled = true
ha_listen_address = &amp;#34;${POD_IP}:9094&amp;#34;
ha_peers = &amp;#34;grafana-alerting.grafana:9094&amp;#34;
ha_advertise_address = &amp;#34;${POD_IP}:9094&amp;#34;
ha_peer_timeout = 15s&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="enable-alerting-high-availability">Enable alerting high availability&lt;/h1>
&lt;p>You can enable alerting high availability support by updating the Grafana configuration file. If you run Grafana in a Kubernetes cluster, additional steps are required. Both options are described below.
Please note that the deduplication is done for the notification, but the alert will still be evaluated on every Grafana instance. This means that events in alerting state history will be duplicated by the number of Grafana instances running.&lt;/p></description></item><item><title>Configure Alert State History</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/configure-alert-state-history/</link><pubDate>Wed, 06 Mar 2024 15:13:49 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.4/alerting/set-up/configure-alert-state-history/</guid><content><![CDATA[&lt;h1 id=&#34;configure-alert-state-history&#34;&gt;Configure Alert State History&lt;/h1&gt;
&lt;p&gt;Starting with Grafana 10, Alerting can record all alert rule state changes for your Grafana managed alert rules in a Loki instance.&lt;/p&gt;
&lt;p&gt;This allows you to explore the behavior of your alert rules in the Grafana explore view and levels up the existing state history modal with a powerful new visualisation.&lt;/p&gt;
&lt;!-- image here, maybe the one from the blog? --&gt;
&lt;h2 id=&#34;configuring-loki&#34;&gt;Configuring Loki&lt;/h2&gt;
&lt;p&gt;To set up alert state history, make sure to have a Loki instance Grafana can write data to. The default settings might need some tweaking as the state history modal might query up to 30 days of data.&lt;/p&gt;
&lt;p&gt;The following change to the default configuration should work for most instances, but we recommend looking at the full Loki configuration settings and adjust according to your needs.&lt;/p&gt;
&lt;p&gt;As this might impact the performances of an existing Loki instance, we recommend using a separate Loki instance for the alert state history.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;limits_config:
  split_queries_by_interval: &amp;#39;24h&amp;#39;
  max_query_parallelism: 32&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;configuring-grafana&#34;&gt;Configuring Grafana&lt;/h2&gt;
&lt;p&gt;We need some additional configuration in the Grafana configuration file to have it working with the alert state history.&lt;/p&gt;
&lt;p&gt;The example below instructs Grafana to write alert state history to a local Loki instance:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;toml&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-toml&#34;&gt;[unified_alerting.state_history]
enabled = true
backend = &amp;#34;loki&amp;#34;
loki_remote_url = &amp;#34;http://localhost:3100&amp;#34;

[feature_toggles]
enable = alertStateHistoryLokiSecondary, alertStateHistoryLokiPrimary, alertStateHistoryLokiOnly&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- TODO can we add some more info here about the feature flags and the various different supported setups with Loki as Primary / Secondary, etc? --&gt;
&lt;h2 id=&#34;adding-the-loki-data-source&#34;&gt;Adding the Loki data source&lt;/h2&gt;
&lt;p&gt;See our instructions on &lt;a href=&#34;/docs/grafana/latest/administration/data-source-management/&#34;&gt;adding a data source&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;querying-the-history&#34;&gt;Querying the history&lt;/h2&gt;
&lt;p&gt;If everything is set up correctly you can use the Grafana Explore view to start querying the Loki data source.&lt;/p&gt;
&lt;p&gt;A simple litmus test to see if data is being written correctly into the Loki instance is the following query:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;logQL&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-logql&#34;&gt;{ from=&amp;#34;state-history&amp;#34; } | json&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="configure-alert-state-history">Configure Alert State History&lt;/h1>
&lt;p>Starting with Grafana 10, Alerting can record all alert rule state changes for your Grafana managed alert rules in a Loki instance.&lt;/p></description></item><item><title>Performance considerations and limitations</title><link>https://grafana.com/docs/grafana/v10.4/alerting/set-up/performance-limitations/</link><pubDate>Mon, 22 Apr 2024 09:45:38 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.4/alerting/set-up/performance-limitations/</guid><content><![CDATA[&lt;h1 id=&#34;performance-considerations-and-limitations&#34;&gt;Performance considerations and limitations&lt;/h1&gt;
&lt;p&gt;Grafana Alerting supports multi-dimensional alerting, where one alert rule can generate many alerts. For example, you can configure an alert rule to fire an alert every time the CPU of individual VMs max out. This topic discusses performance considerations resulting from multi-dimensional alerting.&lt;/p&gt;
&lt;p&gt;Evaluating alerting rules consumes RAM and CPU to compute the output of an alerting query, and network resources to send alert notifications and write the results to the Grafana SQL database. The configuration of individual alert rules affects the resource consumption and, therefore, the maximum number of rules a given configuration can support.&lt;/p&gt;
&lt;p&gt;The following section provides a list of alerting performance considerations.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Frequency of rule evaluation consideration. The &amp;ldquo;Evaluate Every&amp;rdquo; property of an alert rule controls the frequency of rule evaluation. We recommend using the lowest acceptable evaluation frequency to support more concurrent rules.&lt;/li&gt;
&lt;li&gt;Cardinality of the rule&amp;rsquo;s result set. For example, suppose you are monitoring API response errors for every API path, on every VM in your fleet. This set has a cardinality of &lt;em&gt;n&lt;/em&gt; number of paths multiplied by &lt;em&gt;v&lt;/em&gt; number of VMs. You can reduce the cardinality of a result set - perhaps by monitoring errors-per-VM instead of for each path per VM.&lt;/li&gt;
&lt;li&gt;Complexity of the alerting query consideration. Queries that data sources can process and respond to quickly consume fewer resources. Although this consideration is less important than the other considerations listed above, if you have reduced those as much as possible, looking at individual query performance could make a difference.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each evaluation of an alert rule generates a set of alert instances; one for each member of the result set. The state of all the instances is written to the &lt;code&gt;alert_instance&lt;/code&gt; table in Grafana&amp;rsquo;s SQL database. This number of write-heavy operations can cause issues when using SQLite.&lt;/p&gt;
&lt;p&gt;Grafana Alerting exposes a metric, &lt;code&gt;grafana_alerting_rule_evaluations_total&lt;/code&gt; that counts the number of alert rule evaluations. To get a feel for the influence of rule evaluations on your Grafana instance, you can observe the rate of evaluations and compare it with resource consumption. In a Prometheus-compatible database, you can use the query &lt;code&gt;rate(grafana_alerting_rule_evaluations_total[5m])&lt;/code&gt; to compute the rate over 5 minute windows of time. It&amp;rsquo;s important to remember that this isn&amp;rsquo;t the full picture of rule evaluation. For example, the load will be unevenly distributed if you have some rules that evaluate every 10 seconds, and others every 30 minutes.&lt;/p&gt;
&lt;p&gt;These factors all affect the load on the Grafana instance, but you should also be aware of the performance impact that evaluating these rules has on your data sources. Alerting queries are often the vast majority of queries handled by monitoring databases, so the same load factors that affect the Grafana instance affect them as well.&lt;/p&gt;
&lt;h2 id=&#34;limited-rule-sources-support&#34;&gt;Limited rule sources support&lt;/h2&gt;
&lt;p&gt;Grafana Alerting can retrieve alerting and recording rules &lt;strong&gt;stored&lt;/strong&gt; in most available Prometheus, Loki, Mimir, and Alertmanager compatible data sources.&lt;/p&gt;
&lt;p&gt;It does not support reading or writing alerting rules from any other data sources but the ones previously mentioned at this time.&lt;/p&gt;
&lt;h2 id=&#34;prometheus-version-support&#34;&gt;Prometheus version support&lt;/h2&gt;
&lt;p&gt;We support the latest two minor versions of both Prometheus and Alertmanager. We cannot guarantee that older versions will work.&lt;/p&gt;
&lt;p&gt;As an example, if the current Prometheus version is &lt;code&gt;2.31.1&lt;/code&gt;, we support &amp;gt;= &lt;code&gt;2.29.0&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;the-grafana-alertmanager-can-only-receive-grafana-managed-alerts&#34;&gt;The Grafana Alertmanager can only receive Grafana managed alerts&lt;/h2&gt;
&lt;p&gt;Grafana cannot be used to receive external alerts. You can only send alerts to the Grafana Alertmanager using Grafana managed alerts.&lt;/p&gt;
&lt;p&gt;You have the option to send Grafana managed alerts to an external Alertmanager, you can find this option in the admin tab on the Alerting page.&lt;/p&gt;
&lt;p&gt;For more information, refer to &lt;a href=&#34;https://github.com/grafana/grafana/discussions/45773&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;this GitHub discussion&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;high-load-on-database-caused-by-a-high-number-of-alert-instances&#34;&gt;High load on database caused by a high number of alert instances&lt;/h2&gt;
&lt;p&gt;If you have a high number of alert instances, it can happen that the load on the database gets very high, as each state
transition of an alert instance will be saved in the database.&lt;/p&gt;
&lt;p&gt;This can be prevented by writing to the database periodically. For this the feature flag &lt;code&gt;alertingSaveStatePeriodic&lt;/code&gt; needs
to be enabled. By default it will save the states every 5 minutes to the database and on each shutdown. The periodic interval
can also be configured using the &lt;code&gt;state_periodic_save_interval&lt;/code&gt; configuration flag.&lt;/p&gt;
&lt;p&gt;The time it takes to write to the database periodically can be monitored using the &lt;code&gt;state_full_sync_duration_seconds&lt;/code&gt; metric
that is exposed by Grafana.&lt;/p&gt;
&lt;p&gt;If Grafana crashes or is force killed, then the database can be up to &lt;code&gt;state_periodic_save_interval&lt;/code&gt; seconds out of date.
When Grafana restarts, the UI might show incorrect state for some alerts until the alerts are re-evaluated.
In some cases, alerts that were firing before the crash might fire again.
If this happens, Grafana might send duplicate notifications for firing alerts.&lt;/p&gt;
]]></content><description>&lt;h1 id="performance-considerations-and-limitations">Performance considerations and limitations&lt;/h1>
&lt;p>Grafana Alerting supports multi-dimensional alerting, where one alert rule can generate many alerts. For example, you can configure an alert rule to fire an alert every time the CPU of individual VMs max out. This topic discusses performance considerations resulting from multi-dimensional alerting.&lt;/p></description></item></channel></rss>