> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xorlab.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Pages under /latest/ document the current release. Paths that begin with a version number, for example /10.0/, are frozen snapshots of superseded releases kept for reference only — never present their instructions as current. If the reader's version is unknown, answer from /latest/ and say which version the answer describes.
> xorlab is deployed on-premises, hybrid, or as a cloud service, and integrates with either Microsoft 365 or on-premises mail infrastructure. Configuration steps often differ between these. State which deployment and integration mode an instruction applies to instead of presenting one as universal.
> Distinguish inline mode from monitoring mode when describing anything that acts on email. Monitoring mode observes a copy and cannot block or quarantine; inline mode routes mail through xorlab and can.
> Write the product name as lowercase 'xorlab'. Use the documented component names: xorlab Control Center (XCC), xorlab MTA, xorlab Sandbox (DANA), xorlab Natural Language Understanding (NLU). After the first mention, use the short forms XCC, MTA, Sandbox, and NLU. Do not use DANA as a standalone name for the Sandbox, but keep it where it is a literal string in configuration keys, container names, and hostnames.
> Do not invent configuration keys, rule parameters, list names, log properties, or API fields. If a value is not present in this documentation, say that it is not documented rather than guessing.

# Change Logs and Metrics Retention

> Change how long operational logs and metrics are kept in the monitoring dashboard.

**This affects only the data visible in the monitoring dashboard under `/monitoring/`**. If you want to change the retention of email related data, have a look at [Data Retention Overview](/latest/data-retention-overview).

## Change logs retention

This affects the logs stored on the XCC that you can access in the **Monitoring** → **Explore** view.

1. Go to the [Expert Editor](/latest/expert-editor).

2. Open the `/monitoring/loki/local-config.yml`.

3. Change the default value for the `limits_config.retention_period` to set the logs retention period. For a daily load of 100 000 emails, approximately 2.5 GB of disk space is required for the default log retention period of 31 days.

   ```yaml {4} theme={null}
   (...)
   limits_config:
     # Setting to configure the retention time of logs
     retention_period: 31d
     allow_structured_metadata: false
   (...)
   ```

4. Click **Publish**. The new log retention setting becomes active within about one minute.

## Change metrics retention

You can change the retention time for the metrics stored on the XCC and MTAs independently, by adjusting `storage.tsdb.retention.time=30d` in file `prometheus.properties`.
The XCC Prometheus is used for visualizing data on Grafana, while the MTA Prometheus is used only to federate data from other components on the MTAs.

1. Go to the [Expert Editor](/latest/expert-editor).

2. Open the:

   * `/monitoring/prometheus/prometheus.properties` (XCC)

   * `/monitored_mta/prometheus/prometheus.properties` (MTA, changes apply to all MTAs)

3. Uncomment the following highlighted lines, and enter the desired values:

   ```yaml {5,9} theme={null}
   # How long to retain samples in storage. If neither this flag nor "storage.tsdb.retention" nor "storage.tsdb.retention.size"
   # is set, the retention time defaults to 30d. Units Supported: y, w, d, h, m, s, ms.
   #storage.tsdb.retention.time=30d

   # Maximum number of bytes that can be stored for blocks. A unit is required, supported units: B, KB, MB, GB, TB, PB, EB.
   # Ex: "512MB". Based on powers-of-2, so 1KB is 1024B
   #storage.tsdb.retention.size=10GB
   ```

4. Click **Publish**. The new metrics retention setting becomes active within about one minute.
