Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools bucket: Add ability to discover external labels from prometheus address for upload-blocks #7294

Open
Nashluffy opened this issue Apr 20, 2024 · 1 comment

Comments

@Nashluffy
Copy link

Is your proposal related to a problem?

thanos tools bucket upload-blocks is very useful, but having to specify the external labels via --label is tedious and error-prone.

My use-case for upload-blocks is on thanos-sidecar shutdown, I want to ensure all blocks are "flushed" to the bucket. In this case, I'd rather just point at the prometheus instance and have it discover external labels from there, similar to how thanos sidecar discovers the external labels.

Describe the solution you'd like

thanos tools bucket upload-blocks --prometheus.url="localhost:9090" would discover external labels in the exact same manner the sidecar does on start

Describe alternatives you've considered

I currently work around this by hitting prometheus directly for the config, and then formatting --label for each label.

Additional context

N/A

@Nashluffy
Copy link
Author

Alternatively, if thanos sidecar “flushed”/performed one last Sync once it received SIGTERM, I would be able to do away with using this command altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant