From ac83d1f8706195037b252b9e3dcae72c3eb935c7 Mon Sep 17 00:00:00 2001 From: Filip Petkovski Date: Tue, 14 Jun 2022 12:14:30 +0200 Subject: [PATCH] Add docs and todo Signed-off-by: Filip Petkovski --- docs/components/receive.md | 6 ++++++ pkg/api/status/v1.go | 1 + 2 files changed, 7 insertions(+) diff --git a/docs/components/receive.md b/docs/components/receive.md index dbc61685e17..676fbf04cb5 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