Skip to content

fix[cortextool]: fix cortextool out of bounds when running export #289

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LERUfic
Copy link

@LERUfic LERUfic commented Apr 16, 2025

Hello everyone,

Just for background, cortextool has a similar issue to the one reported in mimirtool here: grafana/mimir#6466. it occurs when performing exports.

# ./cortextool remote-read export --address "http://<omit>" --tsdb-path "./fuse-backup/cortex-20250408" --from="2025-04-08T06:00:00+07:00" --id="<omit>" --to="2025-04-08T19:00:00+07:00"
INFO[0000] Created remote read client using endpoint 'http://<ommit>/prometheus/api/v1/read'
INFO[0000] Using existing TSDB in path './fuse-backup/cortex-20250408'
INFO[0000] Querying time from=2025-04-08T06:00:00+07:00 to=2025-04-08T19:00:00+07:00 with selector=up
INFO[0004] Store TSDB blocks in './fuse-backup/cortex-20250408'
INFO[0019] BLOCK ULID                  MIN TIME                       MAX TIME                       DURATION     NUM SAMPLES  NUM CHUNKS   NUM SERIES   SIZE
INFO[0019] 01JRY5XGG1RTAMV2HHY29E0FH9  2025-04-07 23:00:00 +0000 UTC  2025-04-08 00:00:00 +0000 UTC  1h0m0s       789564       6643         3984         1MiB833KiB739B
cortextool: error: process blocks: add sample for metric={__name__="up",<omit>} ts=2025-04-08T07:20:21.247+07:00 value=1.000000: out of bounds, try --help

This issue has already been resolved in Mimir in the following pull request: grafana/mimir#5700. In this PR, I’m simply replicating the changes from that one. Since the idea isn't originally mine, if submitting this PR is considered inappropriate, I’m happy to close it.

Thank you

@LERUfic LERUfic requested a review from a team as a code owner April 16, 2025 02:47
@CLAassistant
Copy link

CLAassistant commented Apr 16, 2025

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

2 participants