Alerting: Extend recording rule definitions/interfaces with data source. (#101678)
Extend the recording rule definition to include the target data source, allowing configuration of where the output of the recording rule is written to. Also extends the relevant interfaces in preparation for the next set of changes.
This commit is contained in:
@@ -533,6 +533,10 @@ type Record struct {
|
||||
// required: true
|
||||
// example: A
|
||||
From string `json:"from" yaml:"from"`
|
||||
// Which data source should be used to write the output of the recording rule, specified by UID.
|
||||
// required: false
|
||||
// example: my-prom
|
||||
TargetDatasourceUID string `json:"target_datasource_uid,omitempty" yaml:"target_datasource_uid,omitempty"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
|
||||
@@ -308,6 +308,7 @@ type AlertRuleNotificationSettingsExport struct {
|
||||
|
||||
// Record is the provisioned export of models.Record.
|
||||
type AlertRuleRecordExport struct {
|
||||
Metric string `json:"metric" yaml:"metric" hcl:"metric"`
|
||||
From string `json:"from" yaml:"from" hcl:"from"`
|
||||
Metric string `json:"metric" yaml:"metric" hcl:"metric"`
|
||||
From string `json:"from" yaml:"from" hcl:"from"`
|
||||
TargetDatasourceUID *string `json:"targetDatasourceUid,omitempty" yaml:"targetDatasourceUid,omitempty" hcl:"target_datasource_uid,optional"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user