# Metrics Retention Not Working as Expected in PMM Server 3.1.0 on Kubernetes

**URL:** <https://forums.percona.com/t/metrics-retention-not-working-as-expected-in-pmm-server-3-1-0-on-kubernetes/38282>\
**Category:** PMM 3.x\
**Tags:** community, pmm, percona, new-release\
**Created:** [June 11, 2025, 11:20am UTC](https://forums.percona.com/t/metrics-retention-not-working-as-expected-in-pmm-server-3-1-0-on-kubernetes/38282 "2025-06-11T11:20:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arul\_Deepan\_Anbumani](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/arul_deepan_anbumani/32/18266_2.png) [@Arul\_Deepan\_Anbumani](https://forums.percona.com/u/Arul_Deepan_Anbumani)\
**Post date:** [June 11, 2025, 11:20am UTC](https://forums.percona.com/t/metrics-retention-not-working-as-expected-in-pmm-server-3-1-0-on-kubernetes/38282/1 "2025-06-11T11:20:23Z")

</div>

We’re running **PMM Server v3.1.0** deployed in Kubernetes using the official Helm chart. As part of our configuration, we’ve explicitly set the following in our Helm values to retain metrics for 90 days

```auto
pmmEnv:
  DATA_RETENTION: "2160h" # 90 days

```

Despite this setting, we’re seeing that metrics are only being retained for 30 days, the default retention period. This same configuration works as expected on **PMM Server 2.x** , where metrics are correctly retained for the full 90-day duration.

It seems that in PMM 3.x, this configuration might not be fully applied via Helm alone. The documentation suggests that retention settings may also need to be configured from the UI, which wasn’t required in the 2.x series.

We would appreciate clarity on this behavior. Specifically:

1. Does PMM 3.x require the `DATA_RETENTION` setting to be applied through the UI even if it’s already provided via Helm?
2. If so, is there a recommended way to configure retention in a fully automated and declarative manner for Kubernetes deployments?

**Environment Details:**

- PMM Server version: 3.1.0
- Deployment: Kubernetes using official Helm chart

We’d appreciate your guidance to ensure this is correctly configured in PMM 3.x.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/7/d/7da0f6021551c2cdfabc869c15de66d5b5864f67.png)

---

<div class="post-metadata">

**Author:** ![Beck](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@Beck](https://forums.percona.com/u/Beck)\
**Post date:** [January 23, 2026, 1:43am UTC](https://forums.percona.com/t/metrics-retention-not-working-as-expected-in-pmm-server-3-1-0-on-kubernetes/38282/2 "2026-01-23T01:43:09Z")

</div>

Just saw your post while looking into something else. [In the 3.x versions](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/deployment-options/docker/env_var.html#performance-storage), the environment variable requires the `PMM_` prefix.

Try setting **`PMM_DATA_RETENTION`** in your `pmmEnv` section.

e.g.

```auto
pmmEnv:
  PMM_DATA_RETENTION: "2160h" # 90 days

```
