The new unified alerting system for Grafana: Everything you need to know
Grafana Alerting has been updated with the release of Grafana 9. To learn all about the new and improved alerting experience, check out our Grafana Alerting documentation and our blog post exploring the latest alerting updates.
Alerting is the part of the Grafana open source project that has received the most requests for features and improvements. For some time now, the changes have been minimal, but we’ve been listening to the community. With Grafana 8, our investment in alerting is here.
To find out more about the new unified alerting system, watch our Intro to unified alerting in Grafana on demand.
Unification first
A huge focus of Grafana 8, which was announced at GrafanaCONline last week, was to create a truly unified alerting experience. We wanted something that was consistent throughout our products and would bring together both Grafana panel alerts and Prometheus-style alerts, regardless of which flavor of Grafana was being used. Now, this means whether you’re using Grafana OSS, Grafana Cloud, or Grafana Enterprise, you will encounter an identical alerting system that behaves exactly the same from product to product.
While this may sound obvious and trivial upfront, the alerting engine beneath the hood has actually undergone a massive transformation. There’s now a common API backing the new alerting engine, which is shared and used across both types of alerts. This monumental change is exciting because it sets us up well moving forward, allowing us to build a host of new features that we weren’t able to quite as easily achieve before. So expect plenty of awesome improvements to continue to be poured into alerting down the road! :)
And of course, this doesn’t mean there aren’t a slew of neat things coming your way right now, either!
One page to rule them all
Gone are the days of multiple pages within Grafana for managing alerts. Now, you’ll find just a single page that consolidates all of your alerts, whether they’re traditional Grafana panel alerts or the more complex Prometheus-backed alerts.
For users of Grafana alerts, you’ll encounter a more powerful interface with much more functionality. You’re now able to create, edit, and manage alert rules all from the same place you view them — no longer having to bounce between separate alerts and dashboard pages. This also means that alerts are no longer exclusively tied to Graph panels.
For users of Grafana Enterprise and Grafana Cloud, you’ll find that the new system brings forward even more alerting details but is now wrapped in a much richer interface for managing and viewing your alerts. This new, friendlier interface is more aligned with the easy-to-use experience that our users have come to love throughout the rest of Grafana. Before, much of the interactions were heavily skewed towards YAML-like textbox editors. Now, the unified alerting experience better guides you through the process of creating a new alert, while also providing sensible defaults along the way.
The best of both worlds
The distinction between the two alerting systems is now solely driven by an alert type that can be chosen when creating a new alert and is easily filtered against when viewing alert rules. With the new system, all legacy alerts of both types will be migrated once the feature is enabled and will be viewable from the unified interface.
From here, you can expect the following enhancements:
- It’s now possible to create a multi-dimensional Grafana alert rule that generates multiple alert instances and returns multiple series from a single query. New alerting rules can be built using one or more queries or expressions, and you can choose between classic expressions or new ones, like math and reduce.
- When viewing alerts, you will have a ton more relevant information available on the main page, which lists all of your alert rules. Before, users were limited to just basic name search and state fiters; Grafana 8 adds searching by labels, filtering by data source, and grouping by folders.
- You’re now able to update and edit your alerts directly from the same page where you view them. This means you no longer have to bounce between your alerts and dashboards in order to update them, and you can easily update many alerts at once with fewer clicks. It’s less time spent trying to find the right information, and more time just knowing what your alerts are doing.
- While Grafana-managed alerts have been decoupled from the Graph panel type, it’s still possible to link dashboards and panels to alerting rules. This is accomplished by linking a dashboard and/or panel ID to the alerting rule. The functionality has also been expanded to now be compatible with Time series, Table, and Heatmap panels, in addition to the original Graph panel type.
- Silences, also known as pauses or mutes, now have their own dedicated section for better organization and visibility, so that you can quickly get a sense of all of your silences without cluttering the main alert rules view.
- Notification channels are now broken down into Notification Policies and Contact Points for better organization as well. Before, Grafana users would define both parameters within the context of a single notification channel; now, these two must be independently defined. For example, a contact point such as an email receiver must first be created before it can be referenced in a notification policy. Notifications generated from different alert instances can be sent through different contact points by matching specific labels to different notification policies.
- The ability to create alert rules against Loki-based log data remains and is fully integrated with the new alerting system, accessible via the Cortex/Loki managed alert type.
When can you use this?
Grafana 8’s new alerting is currently available in Feature Preview mode. While it will be available to try immediately, it won’t be available by default.
For Grafana OSS users, users must opt in and enable the new alerting system in order to use it. Doing so will run a migration before starting Grafana, and the new alerting interface will be available on startup.
Expect the new alerting system to be available as the default experience in an upcoming minor release. With this future release, all alerts will be automatically migrated to the new engine on startup, by default.
For Grafana Enterprise and Grafana Cloud users, this will be made available widely once it is officially available by default and moves beyond Feature Preview mode, in a subsequent Grafana 8.x release. Once this officially rolls out, all alerts will be automatically migrated, and the legacy Enterprise and Cloud Alerting plugins will be deprecated.