Alerting: Allow selection of recording rule write target on per-rule basis. (#101778)
* Alerting: Allow selection of recording rule write target on per-rule basis. Introduces a new feature flag (`grafanaManagedRecordingRulesDatasources`), disabled by default, to enable the ability to write recording rules data using data source settings, and selecting the data source to use on a per-rule basis. To cope with the scenario of users upgrading, a configuration file option allows setting the default data source to use, if none is specified in the rule, emulating the behaviour of recording rules without the flag enabled. * Lint * Update conf/sample.ini Co-authored-by: Alexander Akhmetov <me@alx.cx> --------- Co-authored-by: Alexander Akhmetov <me@alx.cx>
This commit is contained in:
co-authored by
Alexander Akhmetov
parent
5917ed8227
commit
14ebec527c
@@ -1790,6 +1790,15 @@ var (
|
||||
Owner: grafanaAlertingSquad,
|
||||
Expression: "true", // enabled by default
|
||||
},
|
||||
{
|
||||
Name: "grafanaManagedRecordingRulesDatasources",
|
||||
Description: "Enables writing to data sources for Grafana-managed recording rules.",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaAlertingSquad,
|
||||
AllowSelfServe: false,
|
||||
HideFromAdminPage: true,
|
||||
HideFromDocs: true,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -237,3 +237,4 @@ newShareReportDrawer,experimental,@grafana/sharing-squad,false,false,false
|
||||
rendererDisableAppPluginsPreload,experimental,@grafana/sharing-squad,false,false,true
|
||||
assetSriChecks,experimental,@grafana/frontend-ops,false,false,true
|
||||
alertRuleRestore,preview,@grafana/alerting-squad,false,false,false
|
||||
grafanaManagedRecordingRulesDatasources,experimental,@grafana/alerting-squad,false,false,false
|
||||
|
||||
|
@@ -958,4 +958,8 @@ const (
|
||||
// FlagAlertRuleRestore
|
||||
// Enables the alert rule restore feature
|
||||
FlagAlertRuleRestore = "alertRuleRestore"
|
||||
|
||||
// FlagGrafanaManagedRecordingRulesDatasources
|
||||
// Enables writing to data sources for Grafana-managed recording rules.
|
||||
FlagGrafanaManagedRecordingRulesDatasources = "grafanaManagedRecordingRulesDatasources"
|
||||
)
|
||||
|
||||
@@ -1964,6 +1964,20 @@
|
||||
"hideFromDocs": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "grafanaManagedRecordingRulesDatasources",
|
||||
"resourceVersion": "1741291902441",
|
||||
"creationTimestamp": "2025-03-06T20:11:42Z"
|
||||
},
|
||||
"spec": {
|
||||
"description": "Enables writing to data sources for Grafana-managed recording rules.",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/alerting-squad",
|
||||
"hideFromAdminPage": true,
|
||||
"hideFromDocs": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "grafanaconThemes",
|
||||
|
||||
Reference in New Issue
Block a user