You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: `-ruler.alertmanager-url` should be a string
This was never space separated, you needed to register the flag multiple times for it to append to the list of strings.
On top of that, the previous change implied that when using a config file you would need to provide a a list instead of a string thus breaking exisiting configuration.
Signed-off-by: gotjosh <[email protected]>
* Unify the use of StringSlice flags
We had two very similar flag extensions: `Strings` and `StringSlice`.
With this, we unify its use by removing `Strings` in favour of `StringSlice` but keeping the string representation favoured in `Strings`.
The difference here is that by using `Sprintf` we would get the brackets representation as part of the string.
Signed-off-by: gotjosh <[email protected]>
* Rename `api_ruler_test` to `ruler_test`
This is no longer only about the API.
Signed-off-by: gotjosh <[email protected]>
* Create an integration test for Alertmanager discovery
Signed-off-by: gotjosh <[email protected]>
* Fix existing test
Signed-off-by: gotjosh <[email protected]>
Co-authored-by: gotjosh <[email protected]>
err: fmt.Errorf("when alertmanager-discovery is on, host name must be of the form _portname._tcp.service.fqdn (is \"alertmanager.default.svc.cluster.local\")"),
81
81
},
82
82
{
83
83
name: "with multiple URLs and no service discovery",
f.DurationVar(&cfg.EvaluationDelay, "ruler.evaluation-delay-duration", 0, "Duration to delay the evaluation of rules to ensure they underlying metrics have been pushed to cortex.")
133
133
f.DurationVar(&cfg.PollInterval, "ruler.poll-interval", 1*time.Minute, "How frequently to poll for rule changes")
134
134
135
-
f.Var(&cfg.AlertmanagerURL, "ruler.alertmanager-url", "Space-separated list of URL(s) of the Alertmanager(s) to send notifications to. Each Alertmanager URL is treated as a separate group in the configuration. Multiple Alertmanagers in HA per group can be supported by using DNS resolution via -ruler.alertmanager-discovery.")
135
+
f.StringVar(&cfg.AlertmanagerURL, "ruler.alertmanager-url", "", "Comma-separated list of URL(s) of the Alertmanager(s) to send notifications to. Each Alertmanager URL is treated as a separate group in the configuration. Multiple Alertmanagers in HA per group can be supported by using DNS resolution via -ruler.alertmanager-discovery.")
136
136
f.BoolVar(&cfg.AlertmanagerDiscovery, "ruler.alertmanager-discovery", false, "Use DNS SRV records to discover Alertmanager hosts.")
137
137
f.DurationVar(&cfg.AlertmanagerRefreshInterval, "ruler.alertmanager-refresh-interval", 1*time.Minute, "How long to wait between refreshing DNS resolutions of Alertmanager hosts.")
138
138
f.BoolVar(&cfg.AlertmanangerEnableV2API, "ruler.alertmanager-use-v2", false, "If enabled requests to Alertmanager will utilize the V2 API.")
0 commit comments