Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier committed Dec 18, 2019
1 parent 07f711b commit f467acf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ We use *breaking* word for marking changes that are not backward compatible (rel
- [#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
- [#1854](https://github.com/thanos-io/thanos/pull/1854) Update Rule UI to support alerts count displaying and filtering.
- [#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.

- [#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.

## [v0.9.0](https://github.com/thanos-io/thanos/releases/tag/v0.9.0) - 2019.12.03
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func runRule(
dns.ResolverType(dnsSDResolver),
)
for _, cfg := range alertingCfg.Alertmanagers {
// Each Alertmanager client needs its own DNS provider.
// Each Alertmanager client has a different list of targets thus each needs its own DNS provider.
am, err := alert.NewAlertmanager(logger, cfg, amProvider.Clone())
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions docs/service-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The repeatable flag `--store=<store>` can be used to specify a `StoreAPI` that `

The repeatable flag `--query=<query>` can be used to specify a `QueryAPI` that `Thanos Rule` should use.

The repeatable flag `--alertmanagers.url=<alertmanager>` can be used to specify a `Alertmanager API` that `Thanos Rule` should use.
`Thanos Rule` also supports the configuration of Alertmanager endpoints using YAML with the `--alertmanagers.config=<content>` and `--alertmanagers.config-file=<path>` flags in the `StaticAddress` section.

## File Service Discovery

Expand Down Expand Up @@ -77,7 +77,7 @@ Again, the `<path>` can be a glob pattern.

The flag `--query.sd-interval=<5m>` can be used to change the fallback re-read interval.

`Thanos Rule` also supports the configuration of Alertmanager endpoints using YAML with the `--alertmanagers.config=<content>` and `--alertmanagers.config-file=<path>` flags.
`Thanos Rule` also supports the configuration of Alertmanager endpoints using YAML with the `--alertmanagers.config=<content>` and `--alertmanagers.config-file=<path>` flags in the `FileSDfiles` section..

## DNS Service Discovery

Expand Down
11 changes: 11 additions & 0 deletions test/e2e/rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ func (m *mockAlertmanager) ServeHTTP(resp http.ResponseWriter, req *http.Request
m.mtx.Unlock()
}

// TestRuleAlertmanagerHTTPClient verifies that Thanos Ruler can send alerts to
// Alertmanager in various setups:
// * Plain HTTP.
// * HTTPS with custom CA.
// * API with a prefix.
// * API protected by bearer token authentication.
//
// Because Alertmanager supports HTTP only and no authentication, the test uses
// a mocked server instead of the "real" Alertmanager service.
// The other end-to-end tests exercise against the "real" Alertmanager
// implementation.
func TestRuleAlertmanagerHTTPClient(t *testing.T) {
a := newLocalAddresser()

Expand Down

0 comments on commit f467acf

Please sign in to comment.