Alerting: Stop persisting user-defined templates to disk (#83456)

Updates Grafana Alertmanager to work with new interface from grafana/alerting#161. This change stops passing user-defined templates to the Grafana Alertmanager by persisting them to disk and instead passes them by string.
This commit is contained in:
Matthew Jacobson
2024-03-04 20:12:49 +02:00
committed by GitHub
parent fa51724bc6
commit 2e8c514cfd
9 changed files with 47 additions and 209 deletions
@@ -808,7 +808,8 @@ type Config struct {
// MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0.
MuteTimeIntervals []config.MuteTimeInterval `yaml:"mute_time_intervals,omitempty" json:"mute_time_intervals,omitempty"`
TimeIntervals []config.TimeInterval `yaml:"time_intervals,omitempty" json:"time_intervals,omitempty"`
Templates []string `yaml:"templates" json:"templates"`
// Templates is unused by Grafana Managed AM but is passed-through for compatibility with some external AMs.
Templates []string `yaml:"templates" json:"templates"`
}
// A Route is a node that contains definitions of how to handle alerts. This is modified