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
*: Added support for authentication and TLS for Alertmanager (#1838)
* *: support authentication and TLS for Alertmanager
This change adds support for authentication with basic auth, client
certificates and bearer tokens. It also enables to configure TLS
settings for the Alertmanager endpoints.
Most of the work leverages the existing Prometheus configuration format
and code. In particular TLS certificate files are automatically reloaded
whenever they change.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fail hard when --alertmanagers.url and --alertmanagers.config flags are both defined
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Update CHANGELOG.md
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Move tests from cmd/thanos to pkg/alert
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Add end-to-end for Alertmanager file SD
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* test/e2e: add test with different alerting HTTP clients
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fix panic in pkg/alert/client_test.go
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Address Bartek's comments
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Re-use dns.Provider for resolving Alertmanager addresses
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* update documentation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ We use *breaking* word for marking changes that are not backward compatible (rel
18
18
### Added
19
19
-[#1852](https://github.com/thanos-io/thanos/pull/1852) Add support for `AWS_CONTAINER_CREDENTIALS_FULL_URI` by upgrading to minio-go v6.0.44
20
20
-[#1854](https://github.com/thanos-io/thanos/pull/1854) Update Rule UI to support alerts count displaying and filtering.
21
+
-[#1838](https://github.com/thanos-io/thanos/pull/1838) Ruler: Add TLS and authentication support for Alertmanager with the `--alertmanagers.config` and `--alertmanagers.config-file` CLI flags. See [documentation](docs/components/rule.md/#configuration) for further information.
22
+
-[#1838](https://github.com/thanos-io/thanos/pull/1838) Ruler: Add a new `--alertmanagers.sd-dns-interval` CLI option to specify the interval between DNS resolutions of Alertmanager hosts.
alertmgrs:=cmd.Flag("alertmanagers.url", "Alertmanager replica URLs to push firing alerts. Ruler claims success if push to at least one alertmanager from discovered succeeds. The scheme should not be empty e.g `http` might be used. The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect Alertmanager IPs through respective DNS lookups. The port defaults to 9093 or the SRV record's value. The URL path is used as a prefix for the regular Alertmanager API path.").
85
83
Strings()
86
-
87
-
alertmgrsTimeout:=cmd.Flag("alertmanagers.send-timeout", "Timeout for sending alerts to alertmanager").Default("10s").Duration()
84
+
alertmgrsTimeout:=cmd.Flag("alertmanagers.send-timeout", "Timeout for sending alerts to Alertmanager").Default("10s").Duration()
85
+
alertmgrsConfig:=extflag.RegisterPathOrContent(cmd, "alertmanagers.config", "YAML file that contains alerting configuration. See format details: https://thanos.io/components/rule.md/#configuration. If defined, it takes precedence over the '--alertmanagers.url' and '--alertmanagers.send-timeout' flags.", false)
86
+
alertmgrsDNSSDInterval:=modelDuration(cmd.Flag("alertmanagers.sd-dns-interval", "Interval between DNS resolutions of Alertmanager hosts.").
87
+
Default("30s"))
88
88
89
89
alertQueryURL:=cmd.Flag("alert.query-url", "The external Thanos Query URL that would be set in all alerts 'Source' field").String()
0 commit comments