Grafana 11 will remove legacy alerting completely and any legacy alerts will need to be migrated to be compatible with unified alerting. What this means is that any queries that were used to create legacy alert rules will need to be either rewritten or returned as a wide time series format.
We already have a documented method for writing unified alerting compatible queries in the README. This uses the CREATE_TIME_SERIES function in Timestream. However, it can be difficult rewrite a query to use this function just to make it work with unified alerting.
Goal
Ideally, Timestream users should be able to continue to use their existing legacy alerting queries once they have migrated to unified alerting. They should also have an easy way to create new unified alerting queries.
Dev
Automatically return a Wide format time series for alert queries
Alert queries can be detected by checking the request header for the FromAlert header (example)
Long format time series can be turned into wide format time series by using LongToWide from the go plugin-sdk.
Provide a dropdown in the query editor to select the format the data frames are returned in. See the Athena query editor for an example. For Timestream we can allow Table and Time Series as the format.
Background context
Grafana 11 will remove legacy alerting completely and any legacy alerts will need to be migrated to be compatible with unified alerting. What this means is that any queries that were used to create legacy alert rules will need to be either rewritten or returned as a wide time series format.
We already have a documented method for writing unified alerting compatible queries in the README. This uses the CREATE_TIME_SERIES function in Timestream. However, it can be difficult rewrite a query to use this function just to make it work with unified alerting.
Goal
Ideally, Timestream users should be able to continue to use their existing legacy alerting queries once they have migrated to unified alerting. They should also have an easy way to create new unified alerting queries.
Dev
Wide
format time series for alert queriesFromAlert
header (example)LongToWide
from the go plugin-sdk.Table
andTime Series
as the format.