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

# Redis server logs with OpenTelemetry

> Collect self-hosted Redis server logs, slow log entries, and replication events with the OpenTelemetry Collector and forward them to Bronto for cache troubleshooting.

Collect logs from a self-hosted Redis server with the OpenTelemetry Collector. The same Collector can also forward traces and metrics from your apps — see [Connect OpenTelemetry Collector to Bronto](/agent-setup/open-telemetry).

## Prerequisites

* A Bronto account and API key ([how to create one](/Account-Management/API-Keys#create-a-new-api-key))
* Redis configured to log to a file. By default `logfile` is empty (Redis logs to stdout); set it in `redis.conf`
* An [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/installation/) (recommended) or [Fluent Bit](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit) installed on the same host

```ini redis.conf theme={"dark"}
logfile  /var/log/redis/redis-server.log
loglevel notice
```

## Configure the Collector

Redis writes one entry per line, so no multiline handling is needed:

```yaml /etc/otel/config.yaml theme={"dark"}
receivers:
  filelog/redis:
    include:
      - /var/log/redis/redis-server.log
    resource:
      service.name: redis
      service.namespace: <YOUR_COLLECTION_NAME>

processors:
  batch:

exporters:
  otlphttp/brontologs:
    logs_endpoint: "https://ingestion.<REGION>.bronto.io/v1/logs"
    compression: gzip
    headers:
      x-bronto-api-key: <YOUR_API_KEY>

service:
  pipelines:
    logs:
      receivers: [filelog/redis]
      processors: [batch]
      exporters: [otlphttp/brontologs]
```

Set `<REGION>` to `eu` or `us`.

## What you will see in Bronto

Open [Search](https://app.bronto.io/search) and filter by `service.name = redis`. Each line carries the process role indicator (e.g. `M` master, `S` replica, `C` child), a timestamp, a level symbol, and the message — startup, configuration warnings, RDB/AOF persistence, replication, and client events. Bronto's [Custom Parser](/core-features/custom-parser) extracts these fields server-side.

<Note>
  Redis's slow-command log (`SLOWLOG`) is held in memory and read with the `SLOWLOG GET` command — it is not written to the log file, so file tailing does not collect it.
</Note>

## Troubleshooting

* **No logs?** If `logfile` is empty, Redis logs to stdout (or journald under systemd). Set a file path in `redis.conf` and restart, or collect from journald with the `journald` receiver.
* For general issues, see [OTel Collector troubleshooting](https://opentelemetry.io/docs/collector/troubleshooting/).

## Alternative: Fluent Bit

If you already run Fluent Bit, tail the Redis log file and forward it over HTTP:

```ini fluent-bit.conf theme={"dark"}
[INPUT]
    name  tail
    path  /var/log/redis/redis-server.log
    tag   redis

[OUTPUT]
    name        http
    match       redis
    host        ingestion.<REGION>.bronto.io
    port        443
    tls         on
    format      json_lines
    compress    gzip
    header      x-bronto-api-key    <YOUR_API_KEY>
    header      x-bronto-dataset    redis
    header      x-bronto-collection <YOUR_COLLECTION_NAME>
```

Set **Format** to `json_lines`, not `json`. See [Connect Fluent Bit to Bronto](/agent-setup/fluent-bit) for installation and the full output reference.
