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

New retention config not working for old metrics? #4788

Closed
wolfzhaoshuai opened this Issue Oct 26, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@wolfzhaoshuai
Copy link

wolfzhaoshuai commented Oct 26, 2018

I set --storage.tsdb.retention=7d months ago, but this does not met our new need, so I adjusted --storage.tsdb.retention=15d. But when I queried metrics today, I can only find metrics of 7 days.
My config:
/data/apps/prometheus-2.1.0/prometheus --config.file="/data/apps/prometheus-2.1.0/prometheus.yml" --storage.tsdb.path=/data/data/prometheus --storage.tsdb.retention=15d --log.level=debug --storage.tsdb.min-block-duration=1h --storage.tsdb.max-block-duration=3h

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Oct 26, 2018

When have you changed --storage.tsdb.retention? Are you running version 2.1.0? If yes, I would recommend to upgrade to v2.4.3.

Also with 15-days retention, you shouldn't have to change --storage.tsdb.min-block-duration/--storage.tsdb.max-block-duration.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Oct 29, 2018

Could you run the tsdb cli so we can see the time ranges of all blocks. this will help narrow down the issue.

https://github.com/prometheus/tsdb/tree/master/cmd/tsdb

tsdb ls

also double check in ...:9090/flags that the retention is indeed set to 15d.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Nov 8, 2018

@wolfzhaoshuai any progress with this?

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Nov 12, 2018

@wolfzhaoshuai closing for no activity. Please reopen if you are still facing this and will continue the troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.