thanos-io / thanos

Highly available Prometheus setup with long term storage capabilities. A CNCF Incubating project.
https://thanos.io
Apache License 2.0
12.89k stars 2.07k forks source link

Remote write historical blocks #5276

Open thibautmery opened 2 years ago

thibautmery commented 2 years ago

Hello,

I have a prometheus with ~ 6 months of history.

I want to use thanos receiver to be able to send specific metrics in a specific bucket (tuning compactor).

Is it possible to push old historical blocks in the receiver ? Remote write is real time, if new block create => write to receiver. Sidecar is able to push to S3 all history but he is not able to grep on specific metrics, he push entire blocks :/

Any idea ?

hanjm commented 2 years ago

The thanos tool bucket will help to rewrite historic blocks. https://thanos.io/tip/components/tools.md/#bucket-rewrite

thibautmery commented 2 years ago

Hello, Thx for the answer, I already see that tools, but it is something safe ? It can be use on huge bucket in production without any problem?

hanjm commented 2 years ago

@thibautmery rewrite block will generate new block and delete the old block. you can backup the origin block.

stale[bot] commented 2 years ago

Hello 👋 Looks like there was no activity on this issue for the last two months. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.