<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Alert rules on Grafana Labs</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/</link><description>Recent content in Alert rules on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v10.3/alerting/fundamentals/alert-rules/index.xml" rel="self" type="application/rss+xml"/><item><title>Alert rule types</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/alert-rule-types/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/alert-rule-types/</guid><content><![CDATA[&lt;h1 id=&#34;alert-rule-types&#34;&gt;Alert rule types&lt;/h1&gt;
&lt;p&gt;Grafana supports two different alert rule types. Learn more about each of the alert rule types, how they work, and decide which one is best for your use case.&lt;/p&gt;
&lt;h2 id=&#34;grafana-managed-alert-rules&#34;&gt;Grafana-managed alert rules&lt;/h2&gt;
&lt;p&gt;Grafana-managed alert rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of our supported data sources.&lt;/p&gt;
&lt;p&gt;In addition to supporting multiple data sources, you can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported. This is the only type of rule that allows alerting from multiple data sources in a single rule definition.&lt;/p&gt;
&lt;p&gt;The following diagram shows how Grafana-managed alerting works.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 750px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link captioned&#34;
        href=&#34;/media/docs/alerting/grafana-managed-rule.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload mb-0&#34;
          data-src=&#34;/media/docs/alerting/grafana-managed-rule.png&#34;data-srcset=&#34;/media/docs/alerting/grafana-managed-rule.png?w=320 320w, /media/docs/alerting/grafana-managed-rule.png?w=550 550w, /media/docs/alerting/grafana-managed-rule.png?w=750 750w, /media/docs/alerting/grafana-managed-rule.png?w=900 900w, /media/docs/alerting/grafana-managed-rule.png?w=1040 1040w, /media/docs/alerting/grafana-managed-rule.png?w=1240 1240w, /media/docs/alerting/grafana-managed-rule.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Grafana-managed alerting&#34;width=&#34;1302&#34;height=&#34;754&#34;title=&#34;Grafana-managed alerting&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/alerting/grafana-managed-rule.png&#34;
            alt=&#34;Grafana-managed alerting&#34;width=&#34;1302&#34;height=&#34;754&#34;title=&#34;Grafana-managed alerting&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Grafana-managed alerting&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Alert rules are created within Grafana based on one or more data sources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alert rules are evaluated by the Alert Rule Evaluation Engine from within Grafana.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alerts are delivered using the internal Grafana Alertmanager.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can also configure alerts to be delivered using an external Alertmanager; or use both internal and external alertmanagers.
For more information, see Add an external Alertmanager.&lt;/p&gt;
&lt;h2 id=&#34;data-source-managed-alert-rules&#34;&gt;Data source-managed alert rules&lt;/h2&gt;
&lt;p&gt;To create data source-managed alert rules, you must have a compatible Prometheus or Loki data source.&lt;/p&gt;
&lt;p&gt;You can check if your data source supports rule creation via Grafana by testing the data source and observing if the Ruler API is supported.&lt;/p&gt;
&lt;p&gt;For more information on the Ruler API, refer to &lt;a href=&#34;/docs/loki/latest/api/#ruler&#34;&gt;Ruler API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following diagram shows how data source-managed alerting works.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 750px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link captioned&#34;
        href=&#34;/media/docs/alerting/loki-mimir-rule.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload mb-0&#34;
          data-src=&#34;/media/docs/alerting/loki-mimir-rule.png&#34;data-srcset=&#34;/media/docs/alerting/loki-mimir-rule.png?w=320 320w, /media/docs/alerting/loki-mimir-rule.png?w=550 550w, /media/docs/alerting/loki-mimir-rule.png?w=750 750w, /media/docs/alerting/loki-mimir-rule.png?w=900 900w, /media/docs/alerting/loki-mimir-rule.png?w=1040 1040w, /media/docs/alerting/loki-mimir-rule.png?w=1240 1240w, /media/docs/alerting/loki-mimir-rule.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Grafana Mimir/Loki-managed alerting&#34;width=&#34;1104&#34;height=&#34;928&#34;title=&#34;Grafana Mimir/Loki-managed alerting&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/media/docs/alerting/loki-mimir-rule.png&#34;
            alt=&#34;Grafana Mimir/Loki-managed alerting&#34;width=&#34;1104&#34;height=&#34;928&#34;title=&#34;Grafana Mimir/Loki-managed alerting&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Grafana Mimir/Loki-managed alerting&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;ol&gt;
&lt;li&gt;Alert rules are created and stored within the data source itself.&lt;/li&gt;
&lt;li&gt;Alert rules can only be created based on Prometheus data.&lt;/li&gt;
&lt;li&gt;Alert rule evaluation and delivery is distributed across multiple nodes for high availability and fault tolerance.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;choose-an-alert-rule-type&#34;&gt;Choose an alert rule type&lt;/h2&gt;
&lt;p&gt;When choosing which alert rule type to use, consider the following comparison between Grafana-managed alert rules and Grafana Mimir or Loki alert rules.&lt;/p&gt;
&lt;div class=&#34;responsive-table-wrapper&#34;&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;&lt;div style=&#34;width:200px&#34;&gt;Feature&lt;/div&gt;&lt;/th&gt;
              &lt;th&gt;&lt;div style=&#34;width:200px&#34;&gt;Grafana-managed alert rule&lt;/div&gt;&lt;/th&gt;
              &lt;th&gt;&lt;div style=&#34;width:200px&#34;&gt;Loki/Mimir-managed alert rule&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Create alert rules&lt;wbr /&gt; based on data from any of our supported data sources&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;No: You can only create alert rules that are based on Prometheus data. The data source must have the Ruler API enabled.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Mix and match data sources&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Includes support for recording rules&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Add expressions to transform&lt;wbr /&gt; your data and set alert conditions&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Use images in alert notifications&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;No&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Scaling&lt;/td&gt;
              &lt;td&gt;More resource intensive, depend on the database, and are likely to suffer from transient errors. They only scale vertically.&lt;/td&gt;
              &lt;td&gt;Store alert rules within the data source itself and allow for “infinite” scaling. Generate and send alert notifications from the location of your data.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Alert rule evaluation and delivery&lt;/td&gt;
              &lt;td&gt;Alert rule evaluation and delivery is done from within Grafana, using an external Alertmanager; or both.&lt;/td&gt;
              &lt;td&gt;Alert rule evaluation and alert delivery is distributed, meaning there is no single point of failure.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are using non-Prometheus data, we recommend choosing Grafana-managed alert rules. Otherwise, choose Grafana Mimir or Grafana Loki alert rules where possible.&lt;/p&gt;
]]></content><description>&lt;h1 id="alert-rule-types">Alert rule types&lt;/h1>
&lt;p>Grafana supports two different alert rule types. Learn more about each of the alert rule types, how they work, and decide which one is best for your use case.&lt;/p></description></item><item><title>Recording rules</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/recording-rules/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/recording-rules/</guid><content><![CDATA[&lt;h1 id=&#34;recording-rules&#34;&gt;Recording rules&lt;/h1&gt;
&lt;p&gt;&lt;em&gt;Recording rules are only available for compatible Prometheus or Loki data sources.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A recording rule allows you to pre-compute frequently needed or computationally expensive expressions and save their result as a new set of time series. This is useful if you want to run alerts on aggregated data or if you have dashboards that query computationally expensive expressions repeatedly.&lt;/p&gt;
&lt;p&gt;Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.&lt;/p&gt;
&lt;p&gt;Grafana Enterprise offers an alternative to recorded rules in the form of recorded queries that can be executed against any data source.&lt;/p&gt;
&lt;p&gt;For more information on recording rules in Prometheus, refer to &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;recording rules&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="recording-rules">Recording rules&lt;/h1>
&lt;p>&lt;em>Recording rules are only available for compatible Prometheus or Loki data sources.&lt;/em>&lt;/p>
&lt;p>A recording rule allows you to pre-compute frequently needed or computationally expensive expressions and save their result as a new set of time series. This is useful if you want to run alerts on aggregated data or if you have dashboards that query computationally expensive expressions repeatedly.&lt;/p></description></item><item><title>Queries and conditions</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/queries-conditions/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/queries-conditions/</guid><content><![CDATA[&lt;h1 id=&#34;queries-and-conditions&#34;&gt;Queries and conditions&lt;/h1&gt;
&lt;p&gt;In Grafana, queries play a vital role in fetching and transforming data from supported data sources, which include databases like MySQL and PostgreSQL, time series databases like Prometheus, InfluxDB and Graphite, and services like Elasticsearch, AWS CloudWatch, Azure Monitor and Google Cloud Monitoring.&lt;/p&gt;
&lt;p&gt;For more information on supported data sources, see 
    &lt;a href=&#34;/docs/grafana/v10.3/alerting/fundamentals/data-source-alerting/&#34;&gt;Data sources&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The process of executing a query involves defining the data source, specifying the desired data to retrieve, and applying relevant filters or transformations. Query languages or syntaxes specific to the chosen data source are utilized for constructing these queries.&lt;/p&gt;
&lt;p&gt;In Alerting, you define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.&lt;/p&gt;
&lt;p&gt;An alert rule consists of one or more queries and expressions that select the data you want to measure.&lt;/p&gt;
&lt;p&gt;For more information on queries and expressions, see 
    &lt;a href=&#34;/docs/grafana/v10.3/panels-visualizations/query-transform-data/&#34;&gt;Query and transform data&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;data-source-queries&#34;&gt;Data source queries&lt;/h2&gt;
&lt;p&gt;Queries in Grafana can be applied in various ways, depending on the data source and query language being used. Each data source’s query editor provides a customized user interface that helps you write queries that take advantage of its unique capabilities.&lt;/p&gt;
&lt;p&gt;Because of the differences between query languages, each data source query editor looks and functions differently. Depending on your data source, the query editor might provide auto-completion features, metric names, variable suggestions, or a visual query-building interface.&lt;/p&gt;
&lt;p&gt;Some common types of query components include:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Metrics or data fields&lt;/strong&gt;: Specify the specific metrics or data fields you want to retrieve, such as CPU usage, network traffic, or sensor readings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time range&lt;/strong&gt;: Define the time range for which you want to fetch data, such as the last hour, a specific day, or a custom time range.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Filters&lt;/strong&gt;: Apply filters to narrow down the data based on specific criteria, such as filtering data by a specific tag, host, or application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aggregations&lt;/strong&gt;: Perform aggregations on the data to calculate metrics like averages, sums, or counts over a given time period.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grouping&lt;/strong&gt;: Group the data by specific dimensions or tags to create aggregated views or breakdowns.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;Grafana does not support alert queries with template variables. More information is available &lt;a href=&#34;https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;expression-queries&#34;&gt;Expression queries&lt;/h2&gt;
&lt;p&gt;In Grafana, an expression is used to perform calculations, transformations, or aggregations on the data source queried data. It allows you to create custom metrics or modify existing metrics based on mathematical operations, functions, or logical expressions.&lt;/p&gt;
&lt;p&gt;By leveraging expression queries, users can perform tasks such as calculating the percentage change between two values, applying functions like logarithmic or trigonometric functions, aggregating data over specific time ranges or dimensions, and implementing conditional logic to handle different scenarios.&lt;/p&gt;
&lt;p&gt;In Alerting, you can only use expressions for Grafana-managed alert rules. For each expression, you can choose from the math, reduce, and resample expressions. These are called multi-dimensional rules, because they generate a separate alert for each series.&lt;/p&gt;
&lt;p&gt;You can also use classic condition, which creates an alert rule that triggers a single alert when its condition is met. As a result, Grafana sends only a single alert even when alert conditions are met for multiple series.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Classic conditions exist mainly for compatibility reasons and should be avoided if possible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reduce&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Aggregates time series values in the selected time range into a single value.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Math&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Performs free-form math functions/operations on time series and number data. Can be used to preprocess time series data or to define an alert condition for number data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Resample&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Realigns a time range to a new set of timestamps, this is useful when comparing time series data from different data sources where the timestamps would otherwise not align.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Threshold&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Checks if any time series data matches the threshold condition.&lt;/p&gt;
&lt;p&gt;The threshold expression allows you to compare two single values. It returns &lt;code&gt;0&lt;/code&gt; when the condition is false and &lt;code&gt;1&lt;/code&gt; if the condition is true. The following threshold functions are available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is above (x &amp;gt; y)&lt;/li&gt;
&lt;li&gt;Is below (x &amp;lt; y)&lt;/li&gt;
&lt;li&gt;Is within range (x &amp;gt; y1 AND x &amp;lt; y2)&lt;/li&gt;
&lt;li&gt;Is outside range (x &amp;lt; y1 AND x &amp;gt; y2)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Classic condition&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Checks if any time series data matches the alert condition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;Classic condition expression queries always produce one alert instance only, no matter how many time series meet the condition.
Classic conditions exist mainly for compatibility reasons and should be avoided if possible.&lt;/p&gt;
&lt;h2 id=&#34;aggregations&#34;&gt;Aggregations&lt;/h2&gt;
&lt;p&gt;Grafana Alerting provides the following aggregation functions to enable you to further refine your query.&lt;/p&gt;
&lt;p&gt;These functions are available for &lt;strong&gt;Reduce&lt;/strong&gt; and &lt;strong&gt;Classic condition&lt;/strong&gt; expressions only.&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;Function&lt;/th&gt;
              &lt;th&gt;Expression&lt;/th&gt;
              &lt;th&gt;What it does&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;avg&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Displays the average of the values&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;min&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Displays the lowest value&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;max&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Displays the highest value&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;sum&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Displays the sum of all values&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;count&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Counts the number of values in the result&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;last&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Displays the last value&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;median&lt;/td&gt;
              &lt;td&gt;Reduce / Classic&lt;/td&gt;
              &lt;td&gt;Displays the median value&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;diff&lt;/td&gt;
              &lt;td&gt;Classic&lt;/td&gt;
              &lt;td&gt;Displays the difference between the newest and oldest value&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;diff_abs&lt;/td&gt;
              &lt;td&gt;Classic&lt;/td&gt;
              &lt;td&gt;Displays the absolute value of diff&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;percent_diff&lt;/td&gt;
              &lt;td&gt;Classic&lt;/td&gt;
              &lt;td&gt;Displays the percentage value of the difference between newest and oldest value&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;percent_diff_abs&lt;/td&gt;
              &lt;td&gt;Classic&lt;/td&gt;
              &lt;td&gt;Displays the absolute value of percent_diff&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;count_non_null&lt;/td&gt;
              &lt;td&gt;Classic&lt;/td&gt;
              &lt;td&gt;Displays a count of values in the result set that aren&amp;rsquo;t &lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;alert-condition&#34;&gt;Alert condition&lt;/h2&gt;
&lt;p&gt;An alert condition is the query or expression that determines whether the alert will fire or not depending on the value it yields. There can be only one condition which will determine the triggering of the alert.&lt;/p&gt;
&lt;p&gt;After you have defined your queries and/or expressions, choose one of them as the alert rule condition.&lt;/p&gt;
&lt;p&gt;When the queried data satisfies the defined condition, Grafana triggers the associated alert, which can be configured to send notifications through various channels like email, Slack, or PagerDuty. The notifications inform you about the condition being met, allowing you to take appropriate actions or investigate the underlying issue.&lt;/p&gt;
&lt;p&gt;By default, the last expression added is used as the alert condition.&lt;/p&gt;
&lt;h2 id=&#34;recovery-threshold&#34;&gt;Recovery threshold&lt;/h2&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 recovery threshold feature is currently only available in OSS.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;To reduce the noise of flapping alerts, you can set a recovery threshold different to the alert threshold.&lt;/p&gt;
&lt;p&gt;Flapping alerts occur when a metric hovers around the alert threshold condition and may lead to frequent state changes, resulting in too many notifications being generated.&lt;/p&gt;
&lt;p&gt;Grafana-managed alert rules are evaluated for a specific interval of time. During each evaluation, the result of the query is checked against the threshold set in the alert rule. If the value of a metric is above the threshold, an alert rule fires and a notification is sent. When the value goes below the threshold and there is an active alert for this metric, the alert is resolved, and another notification is sent.&lt;/p&gt;
&lt;p&gt;It can be tricky to create an alert rule for a noisy metric. That is, when the value of a metric continually goes above and below a threshold. This is called flapping and results in a series of firing - resolved - firing notifications and a noisy alert state history.&lt;/p&gt;
&lt;p&gt;For example, if you have an alert for latency with a threshold of 1000ms and the number fluctuates around 1000 (say 980 -&amp;gt;1010 -&amp;gt; 990 -&amp;gt; 1020, and so on) then each of those will trigger a notification.&lt;/p&gt;
&lt;p&gt;To solve this problem, you can set a (custom) recovery threshold, which basically means having two thresholds instead of one. An alert is triggered when the first threshold is crossed and is resolved only when the second threshold is crossed.&lt;/p&gt;
&lt;p&gt;For example, you could set a threshold of 1000ms and a recovery threshold of 900ms. This way, an alert rule will only stop firing when it goes under 900ms and flapping is reduced.&lt;/p&gt;
]]></content><description>&lt;h1 id="queries-and-conditions">Queries and conditions&lt;/h1>
&lt;p>In Grafana, queries play a vital role in fetching and transforming data from supported data sources, which include databases like MySQL and PostgreSQL, time series databases like Prometheus, InfluxDB and Graphite, and services like Elasticsearch, AWS CloudWatch, Azure Monitor and Google Cloud Monitoring.&lt;/p></description></item><item><title>Alert instances</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/alert-instances/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/alert-instances/</guid><content><![CDATA[&lt;h1 id=&#34;alert-instances&#34;&gt;Alert instances&lt;/h1&gt;
&lt;p&gt;Grafana managed alerts support multi-dimensional alerting. Each alert rule can create multiple alert instances. This is exceptionally powerful if you are observing multiple series in a single expression.&lt;/p&gt;
&lt;p&gt;Consider the following PromQL expression:&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;promql&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-promql&#34;&gt;sum by(cpu) (
  rate(node_cpu_seconds_total{mode!=&amp;#34;idle&amp;#34;}[1m])
)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A rule using this expression will create as many alert instances as the amount of CPUs we are observing after the first evaluation, allowing a single rule to report the status of each CPU.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p &#34;
    style=&#34;max-width: 2294px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link captioned&#34;
        href=&#34;/static/img/docs/alerting/unified/multi-dimensional-alert.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload mb-0&#34;
          data-src=&#34;/static/img/docs/alerting/unified/multi-dimensional-alert.png&#34;data-srcset=&#34;/static/img/docs/alerting/unified/multi-dimensional-alert.png?w=320 320w, /static/img/docs/alerting/unified/multi-dimensional-alert.png?w=550 550w, /static/img/docs/alerting/unified/multi-dimensional-alert.png?w=750 750w, /static/img/docs/alerting/unified/multi-dimensional-alert.png?w=900 900w, /static/img/docs/alerting/unified/multi-dimensional-alert.png?w=1040 1040w, /static/img/docs/alerting/unified/multi-dimensional-alert.png?w=1240 1240w, /static/img/docs/alerting/unified/multi-dimensional-alert.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;A multi-dimensional Grafana managed alert rule&#34;width=&#34;2294&#34;height=&#34;442&#34;title=&#34;A multi-dimensional Grafana managed alert rule&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/static/img/docs/alerting/unified/multi-dimensional-alert.png&#34;
            alt=&#34;A multi-dimensional Grafana managed alert rule&#34;width=&#34;2294&#34;height=&#34;442&#34;title=&#34;A multi-dimensional Grafana managed alert rule&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;A multi-dimensional Grafana managed alert rule&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
]]></content><description>&lt;h1 id="alert-instances">Alert instances&lt;/h1>
&lt;p>Grafana managed alerts support multi-dimensional alerting. Each alert rule can create multiple alert instances. This is exceptionally powerful if you are observing multiple series in a single expression.&lt;/p></description></item><item><title>Namespaces, folders, and groups</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/organising-alerts/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/organising-alerts/</guid><content><![CDATA[&lt;h2 id=&#34;namespaces-folders-and-groups&#34;&gt;Namespaces, folders, and groups&lt;/h2&gt;
&lt;p&gt;Alerts can be organized using folders for Grafana-managed rules and namespaces for Mimir or Loki rules and group names.&lt;/p&gt;
&lt;h3 id=&#34;namespaces-and-folders&#34;&gt;Namespaces and folders&lt;/h3&gt;
&lt;p&gt;When creating Grafana-managed rules, the folder can be used to perform access control and grant or deny access to all rules within a specific folder.&lt;/p&gt;
&lt;p&gt;A namespace contains one or more groups. The rules within a group are run sequentially at a regular interval. The default interval is one (1) minute. You can rename Grafana Mimir or Loki rule namespaces and groups, and edit group evaluation intervals.&lt;/p&gt;
&lt;h3 id=&#34;groups&#34;&gt;Groups&lt;/h3&gt;
&lt;p&gt;The rules within a group are run sequentially at a regular interval, meaning no rules will be evaluated at the same time and in order of appearance. The default interval is one (1) minute. You can rename Grafana Mimir or Loki rule namespaces and groups, and edit group evaluation intervals.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; If you want rules to be evaluated concurrently and with different intervals, consider storing them in different groups.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; Grafana managed alert rules are evaluated concurrently instead of sequentially.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h2 id="namespaces-folders-and-groups">Namespaces, folders, and groups&lt;/h2>
&lt;p>Alerts can be organized using folders for Grafana-managed rules and namespaces for Mimir or Loki rules and group names.&lt;/p>
&lt;h3 id="namespaces-and-folders">Namespaces and folders&lt;/h3>
&lt;p>When creating Grafana-managed rules, the folder can be used to perform access control and grant or deny access to all rules within a specific folder.&lt;/p></description></item><item><title>Alert rule evaluation</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/rule-evaluation/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/rule-evaluation/</guid><content><![CDATA[&lt;h1 id=&#34;alert-rule-evaluation&#34;&gt;Alert rule evaluation&lt;/h1&gt;
&lt;p&gt;Use alert rule evaluation to determine how frequently an alert rule should be evaluated and how quickly it should change its state.&lt;/p&gt;
&lt;p&gt;To do this, you need to make sure that your alert rule is in the right evaluation group and set a pending period time that works best for your use case.&lt;/p&gt;
&lt;h2 id=&#34;evaluation-group&#34;&gt;Evaluation group&lt;/h2&gt;
&lt;p&gt;Every alert rule is part of an evaluation group. Each evaluation group contains an evaluation interval that determines how frequently the alert rule is checked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data-source managed&lt;/strong&gt; alert rules within the same group are evaluated one after the other, while alert rules in different groups can be evaluated simultaneously. This feature is especially useful when you want to ensure that recording rules are evaluated before any alert rules.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grafana-managed&lt;/strong&gt; alert rules are evaluated at the same time, regardless of alert rule group. The default evaluation interval is set at 10 seconds, which means that Grafana-managed alert rules are evaluated every 10 seconds to the closest 10-second window on the clock, for example, 10:00:00, 10:00:10, 10:00:20, and so on. You can also configure your own evaluation interval, if required.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Evaluation groups and alerts grouping in notification policies are two separate things. Grouping in notification policies allows multiple alerts sharing the same labels to be sent in the same time message.&lt;/p&gt;
&lt;h2 id=&#34;pending-period&#34;&gt;Pending period&lt;/h2&gt;
&lt;p&gt;By setting a pending period, you can avoid unnecessary alerts for temporary problems.&lt;/p&gt;
&lt;p&gt;In the pending period, you select the period in which an alert rule can be in breach of the condition until it fires.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Imagine you have an alert rule evaluation interval set at every 30 seconds and the pending period to 90 seconds.&lt;/p&gt;
&lt;p&gt;Evaluation will occur as follows:&lt;/p&gt;
&lt;p&gt;[00:30] First evaluation - condition not met.&lt;/p&gt;
&lt;p&gt;[01:00] Second evaluation - condition breached.
Pending counter starts. &lt;strong&gt;Alert starts pending.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[01:30] Third evaluation - condition breached. Pending counter = 30s. &lt;strong&gt;Pending state.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[02:00] Fourth evaluation - condition breached. Pending counter = 60s &lt;strong&gt;Pending state.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[02:30] Fifth evaluation - condition breached. Pending counter = 90s. &lt;strong&gt;Alert starts firing&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the alert rule has a condition that needs to be in breach for a certain amount of time before it takes action, then its state changes as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When the condition is first breached, the rule goes into a &amp;ldquo;pending&amp;rdquo; state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The rule stays in the &amp;ldquo;pending&amp;rdquo; state until the condition has been broken for the required amount of time - pending period.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once the required time has passed, the rule goes into a &amp;ldquo;firing&amp;rdquo; state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the condition is no longer broken during the pending period, the rule goes back to its normal state.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you want to skip the pending state, you can simply set the pending period to 0. This effectively skips the pending period and your alert rule will start firing as soon as the condition is breached.&lt;/p&gt;
&lt;p&gt;When an alert rule fires, alert instances are produced, which are then sent to the Alertmanager.&lt;/p&gt;
]]></content><description>&lt;h1 id="alert-rule-evaluation">Alert rule evaluation&lt;/h1>
&lt;p>Use alert rule evaluation to determine how frequently an alert rule should be evaluated and how quickly it should change its state.&lt;/p></description></item><item><title>State and health of alert rules</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/state-and-health/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/state-and-health/</guid><content><![CDATA[&lt;h1 id=&#34;state-and-health-of-alert-rules&#34;&gt;State and health of alert rules&lt;/h1&gt;
&lt;p&gt;The state and health of alert rules help you understand several key status indicators about your alerts.&lt;/p&gt;
&lt;p&gt;There are three key components: &lt;a href=&#34;#alert-rule-state&#34;&gt;alert rule state&lt;/a&gt;, &lt;a href=&#34;#alert-instance-state&#34;&gt;alert instance state&lt;/a&gt;, and &lt;a href=&#34;#alert-rule-health&#34;&gt;alert rule health&lt;/a&gt;. Although related, each component conveys subtly different information.&lt;/p&gt;
&lt;h2 id=&#34;alert-rule-state&#34;&gt;Alert rule state&lt;/h2&gt;
&lt;p&gt;An alert rule can be in either of the following states:&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;State&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;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;None of the time series returned by the evaluation engine is in a &lt;code&gt;Pending&lt;/code&gt; or &lt;code&gt;Firing&lt;/code&gt; state.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Pending&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;At least one time series returned by the evaluation engine is &lt;code&gt;Pending&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Firing&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;At least one time series returned by the evaluation engine is &lt;code&gt;Firing&lt;/code&gt;.&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;Alerts will transition first to &lt;code&gt;pending&lt;/code&gt; and then &lt;code&gt;firing&lt;/code&gt;, thus it will take at least two evaluation cycles before an alert is fired.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;alert-instance-state&#34;&gt;Alert instance state&lt;/h2&gt;
&lt;p&gt;An alert instance can be in either of the following states:&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;State&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;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The state of an alert that is neither firing nor pending, everything is working correctly.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Pending&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The state of an alert that has been active for less than the configured threshold duration.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Alerting&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The state of an alert that has been active for longer than the configured threshold duration.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;NoData&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;No data has been received for the configured time window.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Error&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The error that occurred when attempting to evaluate an alert rule.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;alert-rule-health&#34;&gt;Alert rule health&lt;/h2&gt;
&lt;p&gt;An alert rule can have one the following health statuses:&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;State&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;&lt;strong&gt;Ok&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;No error when evaluating an alert rule.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Error&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;An error occurred when evaluating an alert rule.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;NoData&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The absence of data in at least one time series returned during a rule evaluation.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;special-alerts-for-nodata-and-error&#34;&gt;Special alerts for &lt;code&gt;NoData&lt;/code&gt; and &lt;code&gt;Error&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;When evaluation of an alert rule produces state &lt;code&gt;NoData&lt;/code&gt; or &lt;code&gt;Error&lt;/code&gt;, Grafana Alerting will generate alert instances that have the following additional labels:&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;Label&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;&lt;strong&gt;alertname&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Either &lt;code&gt;DatasourceNoData&lt;/code&gt; or &lt;code&gt;DatasourceError&lt;/code&gt; depending on the state.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;datasource_uid&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The UID of the data source that caused the state.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can handle these alerts the same way as regular alerts by adding a silence, route to a contact point, and so on.&lt;/p&gt;
]]></content><description>&lt;h1 id="state-and-health-of-alert-rules">State and health of alert rules&lt;/h1>
&lt;p>The state and health of alert rules help you understand several key status indicators about your alerts.&lt;/p>
&lt;p>There are three key components: &lt;a href="#alert-rule-state">alert rule state&lt;/a>, &lt;a href="#alert-instance-state">alert instance state&lt;/a>, and &lt;a href="#alert-rule-health">alert rule health&lt;/a>. Although related, each component conveys subtly different information.&lt;/p></description></item><item><title>Notification templating</title><link>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/message-templating/</link><pubDate>Mon, 13 Apr 2026 19:49:35 +0000</pubDate><guid>https://grafana.com/docs/grafana/v10.3/alerting/fundamentals/alert-rules/message-templating/</guid><content><![CDATA[&lt;h1 id=&#34;notification-templating&#34;&gt;Notification templating&lt;/h1&gt;
&lt;p&gt;Notifications sent via contact points are built using notification templates. Grafana&amp;rsquo;s default templates are based on the &lt;a href=&#34;https://golang.org/pkg/text/template&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Go templating system&lt;/a&gt; where some fields are evaluated as text, while others are evaluated as HTML (which can affect escaping).&lt;/p&gt;
&lt;p&gt;The default template &lt;a href=&#34;https://github.com/grafana/alerting/blob/main/templates/default_template.go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;default_template.go&lt;/a&gt; is a useful reference for custom templates.&lt;/p&gt;
&lt;p&gt;Since most of the contact point fields can be templated, you can create reusable custom templates and use them in multiple contact points.&lt;/p&gt;
&lt;h3 id=&#34;using-templates&#34;&gt;Using templates&lt;/h3&gt;
&lt;p&gt;The following example shows how to use default templates to render an alert message in Slack. The message title contains a count of alerts that are firing or were resolved. The message body lists the alerts and their status.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
    style=&#34;max-width: 550px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link captioned&#34;
        href=&#34;/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload mb-0&#34;
          data-src=&#34;/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png&#34;data-srcset=&#34;/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=320 320w, /static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=550 550w, /static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=750 750w, /static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=900 900w, /static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=1040 1040w, /static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=1240 1240w, /static/img/docs/alerting/unified/contact-points-template-fields-8-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Default template&#34;width=&#34;1238&#34;height=&#34;394&#34;title=&#34;Default template&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png&#34;
            alt=&#34;Default template&#34;width=&#34;1238&#34;height=&#34;394&#34;title=&#34;Default template&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Default template&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;The following example shows the use of a custom template within one of the contact point fields.&lt;/p&gt;
&lt;figure
    class=&#34;figure-wrapper figure-wrapper__lightbox w-100p docs-image--no-shadow&#34;
    style=&#34;max-width: 550px;&#34;
    itemprop=&#34;associatedMedia&#34;
    itemscope=&#34;&#34;
    itemtype=&#34;http://schema.org/ImageObject&#34;
  &gt;&lt;a
        class=&#34;lightbox-link captioned&#34;
        href=&#34;/static/img/docs/alerting/unified/contact-points-use-template-8-0.png&#34;
        itemprop=&#34;contentUrl&#34;
      &gt;&lt;div class=&#34;img-wrapper w-100p h-auto&#34;&gt;&lt;img
          class=&#34;lazyload mb-0&#34;
          data-src=&#34;/static/img/docs/alerting/unified/contact-points-use-template-8-0.png&#34;data-srcset=&#34;/static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=320 320w, /static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=550 550w, /static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=750 750w, /static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=900 900w, /static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=1040 1040w, /static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=1240 1240w, /static/img/docs/alerting/unified/contact-points-use-template-8-0.png?w=1920 1920w&#34;data-sizes=&#34;auto&#34;alt=&#34;Default template&#34;width=&#34;1378&#34;height=&#34;778&#34;title=&#34;Default template&#34;/&gt;
        &lt;noscript&gt;
          &lt;img
            src=&#34;/static/img/docs/alerting/unified/contact-points-use-template-8-0.png&#34;
            alt=&#34;Default template&#34;width=&#34;1378&#34;height=&#34;778&#34;title=&#34;Default template&#34;class=&#34;docs-image--no-shadow&#34;/&gt;
        &lt;/noscript&gt;&lt;/div&gt;&lt;figcaption class=&#34;w-100p caption text-gray-13  &#34;&gt;Default template&lt;/figcaption&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;h3 id=&#34;nested-templates&#34;&gt;Nested templates&lt;/h3&gt;
&lt;p&gt;You can embed templates within other templates.&lt;/p&gt;
&lt;p&gt;For example, you can define a template fragment using the &lt;code&gt;define&lt;/code&gt; keyword:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{{ define &amp;#34;mytemplate&amp;#34; }}
  {{ len .Alerts.Firing }} firing. {{ len .Alerts.Resolved }} resolved.
{{ end }}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can then embed custom templates within this fragment using the &lt;code&gt;template&lt;/code&gt; keyword. For example:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&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&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;Alert summary:
{{ template &amp;#34;mytemplate&amp;#34; . }}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can use any of the following built-in template options to embed custom templates.&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;Name&lt;/th&gt;
              &lt;th&gt;Notes&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default.title&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Displays high-level status information.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;default.message&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Provides a formatted summary of firing and resolved alerts.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;teams.default.message&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Similar to &lt;code&gt;default.message&lt;/code&gt;, formatted for Microsoft Teams.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;html-in-notification-templates&#34;&gt;HTML in notification templates&lt;/h3&gt;
&lt;p&gt;HTML in alerting notification templates is escaped. We do not support rendering of HTML in the resulting notification.&lt;/p&gt;
&lt;p&gt;Some notifiers support alternative methods of changing the look and feel of the resulting notification. For example, Grafana installs the base template for alerting emails to &lt;code&gt;&amp;lt;grafana-install-dir&amp;gt;/public/emails/ng_alert_notification.html&lt;/code&gt;. You can edit this file to change the appearance of all alerting emails.&lt;/p&gt;
]]></content><description>&lt;h1 id="notification-templating">Notification templating&lt;/h1>
&lt;p>Notifications sent via contact points are built using notification templates. Grafana&amp;rsquo;s default templates are based on the &lt;a href="https://golang.org/pkg/text/template" target="_blank" rel="noopener noreferrer">Go templating system&lt;/a> where some fields are evaluated as text, while others are evaluated as HTML (which can affect escaping).&lt;/p></description></item></channel></rss>