diff --git a/cmd/thanos/sidecar.go b/cmd/thanos/sidecar.go index f4b319898c..859f58ac6d 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/components/sidecar.md b/docs/components/sidecar.md index 2d735061f3..0534a59ce2 100644 --- a/docs/components/sidecar.md +++ b/docs/components/sidecar.md @@ -142,6 +142,12 @@ Flags: contains object store configuration. See format details: https://thanos.io/storage.md/#configuration + --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. --min-time=0000-01-01T00:00:00Z Start of time range limit to serve. Thanos sidecar will serve only metrics, which happened diff --git a/docs/quick-tutorial.md b/docs/quick-tutorial.md index 42d51bcdeb..15191c5fdd 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