[Meta] MVP for Alerting on Dashboards #71560
Labels
estimate:small
Small Estimated Level of Effort
Feature:Alerting/RuleTypes
Issues related to specific Alerting Rules Types
Feature:Alerting
Feature:ExpressionLanguage
Interpreter expression language (aka canvas pipeline)
Feature:Search
Querying infrastructure in Kibana
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
Meta
Project:Alerting
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Summary
With the introduction of the alerting service, we want to introduce support for configuring alerts based on a specific items in a Dashboard.
It's important to understand that since a Dashboard can have various types of panels embedded, there is no "one size fits all" solution for allowing alerts on anything that could potentially be living on a dashboard. Rather, the alerts need to work on a visualization-by-visualization basis, as each type of visualization[0] will have its own shape of data that it is working with.
This poses an interesting challenge: How can we enable alerts on as many types of dashboard visualizations as possible without doing one-off alerting integrations for every single one of them?
Scope
The alerting, app, & arch teams have collaborated on an architecture which would allow alerts to work with minimal configuration for any types of visualizations which are backed by Kibana expressions:
This approach would allow for a unified implementation for integrating alerts across all of these apps, with relatively little work that needs to be done on each individual visualization. This meta issue exists to track implementation of alerting across these three apps, so that alerts on these items can be created from a dashboard.
Visualizations which do not leverage expressions, such as the Maps app, will not be able to use this shared infrastructure. Apps falling under this umbrella will need to do their own integration directly with the alerting service in order to provide alerts on their panels from the dashboard.
Tasks
Prerequisites
Add Alerts to Lens visualizations
Add Alerts to other visualizations
Canvas implementation of Alerting: business priority TBD. Technically, to do this we will need to update Canvas elements to integrate with alerting.
Architecture
Description
Each visualization type registers its "alertable" data to a shared data adapter in a common format (format still TBD). This happens inside of the expression renderer which is specific to that vis. Each vis triggers a UI Action which can tell the alerting config panel to open.
The alerting config panel is used to create the actual alert executor. This executor takes the expression which was used to generate the visualization, and runs it with the expressions service on the server. The executor then "picks up" the data which were registered to the data adapter as a side effect of running the expression, and uses that data to determine whether the alert should be triggered. In this way, the data backing a visualization can be extracted from a vis on the server, without actually rendering the visualization itself.
Work that needs to happen per-visualization
There are a few different shared services that each visualization needs to talk to:
Notes
[0] For the purposes of this issue, "visualization" will refer to any Lens visualization, Canvas element, or core vis type created in the Visualize app.
[1] Technically first-class support for expressions-based alerts is not required to accomplish the MVP described here. Rather, the alert executors would only need to have the expressions & data adapter services made available to them.
[2] These are called "inspector" adapters because they are the same framework used by inspector panels when displaying information such as the request/response info for a visualization, or the raw tabular data which was received.
Related meta issue for alerting in Discover: #71099
cc @AlonaNadler @shaunmcgough @arisonl @rayafratkina @stacey-gammon @elastic/kibana-alerting-services @elastic/kibana-app @elastic/kibana-app-arch
The text was updated successfully, but these errors were encountered: