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

# Prometheus integration

> Export Rime on-prem OpenTelemetry metrics for Prometheus to scrape.

Rime model containers export OpenTelemetry metrics. An OpenTelemetry Collector can receive those metrics and expose a Prometheus-compatible endpoint.

## Configure the model container

Point the model at a collector available as `otelcol` on the same Docker network:

```yaml theme={null}
services:
  model:
    environment:
      OTEL_COLLECTOR_PROTOCOL: grpc
      OTEL_COLLECTOR_ENDPOINT: http://otelcol:4317
```

See [Health checks and metrics](/docs/on-prem/metrics) for the emitted series and histogram controls.

## Configure the collector

Create `otelcol.yaml`:

```yaml theme={null}
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

exporters:
  prometheus:
    endpoint: 0.0.0.0:9090

service:
  pipelines:
    metrics:
      receivers: [otlp]
      exporters: [prometheus]
```

Run the collector on the model's Docker network and expose its Prometheus port:

```shell theme={null}
docker run -d \
  --name rime-otelcol \
  --network "<rime-network>" \
  -p 9090:9090 \
  -v "$(pwd)/otelcol.yaml:/etc/otelcol-contrib/config.yaml:ro" \
  otel/opentelemetry-collector-contrib:0.139.0
```

## Configure Prometheus

Add the collector to `prometheus.yml`:

```yaml theme={null}
global:
  scrape_interval: 5s

scrape_configs:
  - job_name: "rime-tts"
    static_configs:
      - targets: ["<collector-host>:9090"]
```

Reload Prometheus, open **Status > Targets**, and confirm that the `rime-tts` target is up.
