Metrics Retention Configuration
By default, MariaDB Enterprise Manager retains detailed metrics for 30 days. You can configure this data retention period to balance your need for historical data with storage costs.
This guide explains how to change the retention period and how the underlying storage system works.
How to Change the Retention Period
Changing the retention time is done by editing the environment file for Enterprise Manager and then restarting the services.
Data Retention Policy
Prometheus, the time-series database used by Enterprise Manager, does not delete expired data instantly.
Block-Based Storage: Prometheus stores metrics data in blocks, which are typically two-hour chunks of time. In the background, these small blocks are compacted into larger ones.
Delayed Cleanup: Data is not deleted on a sample-by-sample basis. Instead, Prometheus removes an entire block once all the data within it has passed the retention period. This cleanup process runs in the background and may not be immediate.
Valid Retention Time Units
When setting PROMETHEUS_RETENTION_TIME, you can use the following units:
y- yearsw- weeksd- daysh- hoursm- minutess- seconds
This page is: Copyright © 2025 MariaDB. All rights reserved.
Last updated
Was this helpful?

