<a id="c3-data-retention"></a>

# Data retention for Confluent Control Center

Control Center stores cluster metadata and user data (alerts triggers/actions) in
the `_confluent-command` topic.
This topic is not changed during an upgrade. To reset the topic, change the
`confluent.controlcenter.command.topic` configuration
to something else (for example, `_confluent-command-2`) and restart
Control Center.
This will re-index the cluster metadata and remove all triggers/actions.

## Retention defaults

Control Center has the following retention defaults:

- Command topic (`_confluent-command`): data for one day

This means that you can take Control Center down for maintenance for as long as 24
hours without data loss.

Although configurable, reducing the retention of the command topic (`confluent.controlcenter.command.topic.retention.ms`)
has negligible impact on Control Center’s footprint.

## Retention for metrics and monitoring

By default Prometheus retains metrics for last 15 days.

You can override this configuration by setting an environment variable on the Control Center node.

**Manual**

```none
METRICS_RETENTION_DAYS=30d
```

```none
sudo systemctl (re)start prometheus
```

**Ansible**

```none
control_center_next_gen_dependency_prometheus_service_environment_overrides:
  #other props
  METRICS_RETENTION_DAYS: "30d"
```

**CFK**

```none
services:
    prometheus:
      image: <image>
      containerTemplate:
            envVars:
              - name: METRICS_RETENTION_DAYS
                value: 30d
```

## Metrics data and cluster outage

In the event of cluster outage, the Control Center user
interface is unavailable, but ingestion and alerting continue to function.
