# Metrics

Settings for collecting metrics of the core and FFmpeg processes.

## Configuration

{% tabs %}
{% tab title="JSON" %}

```
{
   "metrics": {
      "enable": false,
      "enable_prometheus": false,
      "range_sec": 300,
      "interval_sec": 2
   }
}
```

{% endtab %}

{% tab title="ENV" %}

```
CORE_METRICS_ENABLE=false
CORE_METRICS_ENABLE_PROMETHEUS=false
CORE_METRICS_RANGE_SECONDS=300
CORE_METRICS_INTERVAL_SECONDS=2
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Caution with many processes and low values! It will increases CPU and RAM usage.
{% endhint %}

### enable (bool)

Enable collecting metrics data of the datarhei Core itself and the FFmpeg processes. The metrics can be queried via the [metrics API endpoint](/core/api/metrics.md).

By default collecting the metrics is disabled.

### enable\_prometheus (bool)

Enable prometheus endpoint at `/metrics`. This requires that collecting metrics is enabled.

By default this is disabled.

### range\_sec (integer)

Define for how many seconds historic metrics data should be kept.

By default this value is set to `300`.

### interval\_sec (integer)

Define in which interval (in seconds) the metrics should be collected.

By default this value is set to `2`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datarhei.com/core/configuration/metrics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
