Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#8190](https://github.com/thanos-io/thanos/pull/8190) Fix markdown formatting in CHANGELOG.
- [#8202](https://github.com/thanos-io/thanos/pull/8202) Receive: Unhide `--tsdb.enable-native-histograms` flag
- [#8225](https://github.com/thanos-io/thanos/pull/8225) tools: Extend bucket ls options.
- [#8280](https://github.com/thanos-io/thanos/pull/8280) docs: legacy --store flags + alerts examples legacy metrics

### Added

Expand Down
14 changes: 7 additions & 7 deletions docs/service-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The simplest way to tell a component about a peer is to use a static flag.

### Thanos Querier

The repeatable flag `--store=<store>` can be used to specify a `StoreAPI` that `Thanos Querier` should use.
The repeatable flag `--endpoint.sd-config=<content>` can be used to specify a `StoreAPI` that `Thanos Querier` should use.

### Thanos Ruler

Expand Down Expand Up @@ -54,9 +54,9 @@ As a fallback, the file contents are periodically re-read at an interval that ca

### Thanos Querier

The repeatable flag `--store.sd-files=<path>` can be used to specify the path to files that contain addresses of `StoreAPI` servers. The `<path>` can be a glob pattern so you can specify several files using a single flag.
The repeatable flag `--endpoint.sd-config-file` can be used to specify the path to files that contain addresses of `StoreAPI` servers. The `<path>` can be a glob pattern so you can specify several files using a single flag.

The flag `--store.sd-interval=<5m>` can be used to change the fallback re-read interval from the default 5 minutes.
The flag `--endpoint.sd-config-reload-interval=<5m>` can be used to change the fallback re-read interval from the default 5 minutes.

### Thanos Ruler

Expand All @@ -73,27 +73,27 @@ To use DNS SD, just add one of the following prefixes to the domain name in your
* `dns+` - the domain name after this prefix will be looked up as an A/AAAA query. *A port is required for this query type*. An example using this lookup with a static flag:

```
--store=dns+stores.thanos.mycompany.org:9090
--endpoint.sd-config=dns+stores.thanos.mycompany.org:9090
```

* `dnssrv+` - the domain name after this prefix will be looked up as a SRV query, and then each SRV record will be looked up as an A/AAAA query. You do not need to specify a port as the one from the query results will be used. For example:

```
--store=dnssrv+_thanosstores._tcp.mycompany.org
--endpoint.sd-config=dnssrv+_thanosstores._tcp.mycompany.org
```

DNS SRV record discovery also work well within Kubernetes. Consider the following example:

```
--store=dnssrv+_grpc._tcp.thanos-store.monitoring.svc
--endpoint.sd-config=dnssrv+_grpc._tcp.thanos-store.monitoring.svc
```

This configuration will instruct Thanos to discover all endpoints within the `thanos-store` service in the `monitoring` namespace and use the declared port named `grpc`.

* `dnssrvnoa+` - the domain name after this prefix will be looked up as a SRV query, with no A/AAAA lookup made after that. Similar to the `dnssrv+` case, you do not need to specify a port. For example:

```
--store=dnssrvnoa+_thanosstores._tcp.mycompany.org
--endpoint.sd-config=dnssrvnoa+_thanosstores._tcp.mycompany.org
```

The default interval between DNS lookups is 30s. This interval can be changed using the `store.sd-dns-interval` flag for `StoreAPI` configuration in `Thanos Querier`, or `query.sd-dns-interval` for `QueryAPI` configuration in `Thanos Ruler`.
Expand Down
8 changes: 4 additions & 4 deletions examples/alerts/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ groups:
summary: Thanos Query is having high number of DNS failures.
expr: |
(
sum by (job) (rate(thanos_query_store_apis_dns_failures_total{job=~".*thanos-query.*"}[5m]))
sum by (job) (rate(thanos_query_endpoints_dns_failures_total{job=~".*thanos-query.*"}[5m]))
/
sum by (job) (rate(thanos_query_store_apis_dns_lookups_total{job=~".*thanos-query.*"}[5m]))
sum by (job) (rate(thanos_query_endpoints_dns_lookups_total{job=~".*thanos-query.*"}[5m]))
) * 100 > 1
for: 15m
labels:
Expand Down Expand Up @@ -349,9 +349,9 @@ groups:
summary: Thanos Store has high latency for store series gate requests.
expr: |
(
histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_series_gate_duration_seconds_bucket{job=~".*thanos-store.*"}[5m]))) > 2
histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_series_gate_queries_duration_seconds_bucket{job=~".*thanos-store.*"}[5m]))) > 2
and
sum by (job) (rate(thanos_bucket_store_series_gate_duration_seconds_count{job=~".*thanos-store.*"}[5m])) > 0
sum by (job) (rate(thanos_bucket_store_series_gate_queries_duration_seconds_count{job=~".*thanos-store.*"}[5m])) > 0
)
for: 10m
labels:
Expand Down
Loading