[v10.1.x] Alerting: Add support for keep_firing_for field from external rulers (#75257)

This commit is contained in:
grafana-delivery-bot[bot]
2023-09-22 01:02:51 +02:00
committed by GitHub
parent 8c5cc1a7cc
commit 1bb4a7299b
6 changed files with 157 additions and 10 deletions
@@ -258,12 +258,13 @@ func (c *GettableRuleGroupConfig) validate() error {
}
type ApiRuleNode struct {
Record string `yaml:"record,omitempty" json:"record,omitempty"`
Alert string `yaml:"alert,omitempty" json:"alert,omitempty"`
Expr string `yaml:"expr" json:"expr"`
For *model.Duration `yaml:"for,omitempty" json:"for,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"`
Record string `yaml:"record,omitempty" json:"record,omitempty"`
Alert string `yaml:"alert,omitempty" json:"alert,omitempty"`
Expr string `yaml:"expr" json:"expr"`
For *model.Duration `yaml:"for,omitempty" json:"for,omitempty"`
KeepFiringFor *model.Duration `yaml:"keep_firing_for,omitempty" json:"keep_firing_for,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"`
}
type RuleType int