Data Metrics cleanup (Prometheus windows Version) #12786
Answered
by
roidelapluie
AboSalah-1982
asked this question in
Q&A
-
Proposalhow to do cleanup for old data for Prometheus in windows version? at the minute it seems to be an infinitely growing data store with no way to clean old data |
Beta Was this translation helpful? Give feedback.
Answered by
roidelapluie
Sep 3, 2023
Replies: 1 comment
-
To set a time-based data retention policy in Prometheus on Windows, use the --storage.tsdb.retention.time flag:
To set a size-based retention policy, use the --storage.tsdb.retention.size flag:
You can combine both flags to enforce both time and size limits:
Update these flags in your service configuration if you're running Prometheus as a service, then restart it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AboSalah-1982
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To set a time-based data retention policy in Prometheus on Windows, use the --storage.tsdb.retention.time flag:
To set a size-based retention policy, use the --storage.tsdb.retention.size flag:
You can combine both flags to enforce both time and size limits:
Update these flags in your service configuration if you're running Prometheus as a service, then restart it.