Skip to content

Commit

Permalink
improve file sd docs (thanos-io#2724)
Browse files Browse the repository at this point in the history
Signed-off-by: Povilas Versockas <[email protected]>
  • Loading branch information
povilasv authored Jun 5, 2020
1 parent 6f2c3b1 commit 770fde0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/components/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,25 @@ If `PathPrefixStrip: /some-path` option or `traefik.frontend.rule.type: PathPref
Kubernetes Ingress annotation is set, then `Traefik` writes the stripped prefix into X-Forwarded-Prefix header.
Then, `thanos query --web.prefix-header=X-Forwarded-Prefix` will serve correct HTTP redirects and links prefixed by the stripped path.

## File SD

`--store.sd-file` flag provides a path to a JSON or YAML formatted file, which contains a list of targets in [Prometheus target format](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config).

Example file SD file in YAML:

```
- targets:
- prometheus-0.thanos-sidecar:10901
- prometheus-1.thanos-sidecar:10901
- thanos-store:10901
- thanos-short-store:10901
- thanos-rule:10901
- targets:
- prometheus-0.thanos-sidecar.infra:10901
- prometheus-1.thanos-sidecar.infra:10901
- thanos-store.infra:10901
```


## Flags

Expand Down

0 comments on commit 770fde0

Please sign in to comment.