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

"Prometheus server at http://localhost:9090 is configured to only keep 0s of metrics history." When using default config #958

Closed
jonathan-dev opened this issue Apr 23, 2024 · 0 comments · Fixed by #960
Assignees

Comments

@jonathan-dev
Copy link

I was getting a bunch of these errors:

Warning: `alertmanager_notifications_failed_total[2m]` selector is trying to query Prometheus for 2m worth of metrics, but `prom1` Prometheus server at http://localhost:9090 is configured to only keep 0s of metrics history. (promql/range_query)

This makes sense and all but when the retention time flags are not set on startup prometheus defaults to a retention time of 15days. That is not reflected in the /flags endpoint which then returns the 0s for storage.tsdb.retention.time which is read by this tool (check this issue for details).

Under the /status endpoint the 15d retention time is listed. Maybe this should be used as the time for the retention time since it returns the correct value and using the other one the warnings are misleading.

@prymitive prymitive self-assigned this Apr 23, 2024
prymitive added a commit that referenced this issue Apr 23, 2024
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 a pull request may close this issue.

2 participants