diff --git a/docs/components/receive.md b/docs/components/receive.md index 542546b6e12..ccd2f2a0e3f 100644 --- a/docs/components/receive.md +++ b/docs/components/receive.md @@ -12,6 +12,12 @@ For more information please check out [initial design proposal](../proposals-don > NOTE: As the block producer it's important to set correct "external labels" that will identify data block across Thanos clusters. See [external labels](../storage.md#external-labels) docs for details. +## TSDB stats + +Thanos Receive supports getting TSDB stats using the `/api/v1/status/tsdb` endpoint. Use the `THANOS-TENANT` HTTP header to get stats for individual Tenants. The output format of the endpoint is compatible with [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-stats). + +Note that each Thanos Receive will only expose local stats and replicated series will not be included in the response. + ## Example ```bash diff --git a/pkg/api/status/v1.go b/pkg/api/status/v1.go index cb84ba63346..1755cbce410 100644 --- a/pkg/api/status/v1.go +++ b/pkg/api/status/v1.go @@ -65,6 +65,7 @@ type Options struct { Registry *prometheus.Registry } +// TODO(fpetkovski): replace with upstream struct after dependency update. type StatusAPI struct { getTSDBStats GetStatsFunc options Options