-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Sidecar: use prometheus metrics for min timestamp #7820
Sidecar: use prometheus metrics for min timestamp #7820
Conversation
51c58f7
to
6cff6e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG - some typos though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not http://localhost:9090/api/v1/status/tsdb
? Should be much faster than gathering all metrics and then parsing them not to mention the overhead of the PromQL engine.
It doesn't have this data for whole tsdb. Only for head |
Read "minT" from prometheus metrics so that we also set it for sidecars that are not uploading blocks. Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
6cff6e2
to
c4d1de9
Compare
This PR makes sidecar read "minT" from prometheus metrics instead of the shipper. This has the benefit that it also works for sidecar deployments that do not upload blocks, so that they can be pruned by time range too.