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

Uploaded data not queryable from Thanos query frontend #2

Open
makeittotop opened this issue Mar 10, 2022 · 1 comment
Open

Uploaded data not queryable from Thanos query frontend #2

makeittotop opened this issue Mar 10, 2022 · 1 comment

Comments

@makeittotop
Copy link

Hi,

I've followed along the README, and successfully managed to upload some test data into a Thanos stack via the thanos-kit import command. The command does indicate that the data has been successfully uploaded into the remote store.

bash-4.4$ ./thanos-kit import --objstore.config-file=thanos.yaml --data-dir=/var/thanos/store/ --label=tenant_id="57236109-c0e3-4b53-8700-30232dbb073d" --input-file=prom-fake-metrics.txt 
level=info ts=2022-03-09T23:44:12.229943189Z caller=import.go:84 msg="cleanup cache dir"
level=info ts=2022-03-09T23:44:12.230056999Z caller=import.go:41 msg="started importing input data."
level=info ts=2022-03-09T23:44:12.234032216Z caller=import.go:78 msg="no more input data, committing appenders and flushing block(s)"
level=info ts=2022-03-09T23:44:12.234088423Z caller=writer.go:121 msg=flushing series_count=2 mint=1970-01-20T01:27:25.2Z maxt=1970-01-20T01:27:28.741Z
level=info ts=2022-03-09T23:44:12.251629736Z caller=compact.go:495 msg="write block" mint=1646845200 maxt=1646848741 ulid=01FXRH35EAM62FH7H2QY887FDT duration=17.480839ms
level=info ts=2022-03-09T23:44:12.25342421Z caller=import.go:87 msg="blocks flushed" ids=[01FXRH35EAM62FH7H2QY887FDT]
level=info ts=2022-03-09T23:44:12.253658362Z caller=factory.go:46 msg="loading bucket configuration"
level=info ts=2022-03-09T23:44:12.759972394Z caller=import.go:72 msg="uploaded block" id=01FXRH35EAM62FH7H2QY887FDT duration=505.960231ms
level=info ts=2022-03-09T23:44:12.760010495Z caller=import.go:84 msg="cleanup cache dir"

I see the related data in the bucket dir. created as well.

# mc ls hgst/observatorium-spi-testbox-test-01/01FXRH35EAM62FH7H2QY887FDT
[2022-03-09 23:44:12 UTC]   476B STANDARD index
[2022-03-09 23:44:12 UTC]   421B STANDARD meta.json
[2022-03-10 15:14:44 UTC]     0B chunks/

However, I'm still not able ot query the data from the thanos query frontend, even after a restart.

What am I missing, can you please help?

@knightsg
Copy link

I know this issue is really old but I recently resolved this myself so figured I would add my experience for others who may come across this. Like @makeittotop, my blocks were being imported with timestamps in the 1970's and while the import appeared to be working, it would only take maybe 20s total instead of the ~2hrs mentioned in the README. I was also unable to query the import metrics via the thanos querier UI after they were "imported".

I suspected the issue was the timeframe and eventually discovered I was correct, because the metrics I had in my source prometheus textfile had the timestamp in seconds, not ms which is also in the README but which I'd overlooked. I fixed that and the import time increased to an hour or so. Afterwards, I was able to query the imported metrics without issues.

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

2 participants