From e3bc18d9ca14540c3f0f2dbf0ab5e2e6fa56582a Mon Sep 17 00:00:00 2001 From: Bartek Plotka Date: Tue, 3 Dec 2019 18:24:46 +0000 Subject: [PATCH] Promote sidecar shipper.upload-compacted flag to non hidden, non experimental state. Signed-off-by: Bartek Plotka --- cmd/thanos/sidecar.go | 2 +- docs/quick-tutorial.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/thanos/sidecar.go b/cmd/thanos/sidecar.go index f4b319898c2..859f58ac6d3 100644 --- a/cmd/thanos/sidecar.go +++ b/cmd/thanos/sidecar.go @@ -58,7 +58,7 @@ func registerSidecar(m map[string]setupFunc, app *kingpin.Application) { objStoreConfig := regCommonObjStoreFlags(cmd, "", false) - uploadCompacted := cmd.Flag("shipper.upload-compacted", "[Experimental] If true sidecar will try to upload compacted blocks as well. Useful for migration purposes. Works only if compaction is disabled on Prometheus.").Default("false").Hidden().Bool() + uploadCompacted := cmd.Flag("shipper.upload-compacted", "If true sidecar will try to upload compacted blocks as well. Useful for migration purposes. Works only if compaction is disabled on Prometheus. Do it once and then disable the flag when done.").Default("false").Bool() minTime := thanosmodel.TimeOrDuration(cmd.Flag("min-time", "Start of time range limit to serve. Thanos sidecar will serve only metrics, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y."). Default("0000-01-01T00:00:00Z")) diff --git a/docs/quick-tutorial.md b/docs/quick-tutorial.md index 42d51bcdeb0..15191c5fdd1 100644 --- a/docs/quick-tutorial.md +++ b/docs/quick-tutorial.md @@ -93,6 +93,11 @@ thanos sidecar \ * _[Example Kubernetes manifests using Prometheus operator](https://github.com/coreos/prometheus-operator/tree/master/example/thanos)_ +### Uploading old metrics. + +When sidecar is run with the `--shipper.upload-compacted` flag it will sync all older existing blocks from the Prometheus local storage on startup. +NOTE: This assumes you never run sidecar with block uploading against this bucket. Otherwise manual steps are needed to remove overlapping blocks from the bucket. +Those will be suggested by the sidecar verification process. #### External Labels