Skip to content

Commit

Permalink
Promote sidecar shipper.upload-compacted flag to non hidden, non expe…
Browse files Browse the repository at this point in the history
…rimental state. (#1833)

Signed-off-by: Bartek Plotka <[email protected]>
  • Loading branch information
bwplotka authored Dec 5, 2019
1 parent 9193730 commit fd01026
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/thanos/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
6 changes: 6 additions & 0 deletions docs/components/sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docs/quick-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fd01026

Please sign in to comment.