> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/extensions/redis-storage.md).

# Redis Storage

Redis Storage is a collector-level extension that persists data to a Redis database. It does not receive, process, or export telemetry. Instead it provides a backing store that other components use to retain state across collector restarts, such as persistent queues and stateful processors like the [Drain processor](/integrations/processors/drain.md). Because the data lives in Redis rather than on local disk, it is a good alternative to File Storage when collector hosts are shared or ephemeral, or when multiple collectors need to share storage.

### Prerequisites

A reachable Redis instance that the collector can connect to over the network. You need its `host:port` endpoint, and any password, database index, or TLS material required to authenticate to it.

### Configuration

#### Basic Configuration

**Connection**

| Parameter | Type   | Required | Default          | Description                                                                |
| --------- | ------ | -------- | ---------------- | -------------------------------------------------------------------------- |
| Endpoint  | String | Yes      | `localhost:6379` | The endpoint of the Redis instance to connect to, in the form `host:port`. |

**Advanced**

| Parameter                         | Type    | Required | Default   | Description                                                                                                                                                       |
| --------------------------------- | ------- | -------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Password                          | String  | No       | *(empty)* | The password used to connect to the Redis instance. Stored as a sensitive value.                                                                                  |
| Database                          | Integer | No       | `0`       | The Redis database to select after connecting to the server.                                                                                                      |
| Expiration                        | Integer | No       | `0`       | The TTL for stored entries, in seconds. Set to `0` for no expiration.                                                                                             |
| Key Prefix                        | String  | No       | *(empty)* | A prefix appended to the default Redis key used for stored entries.                                                                                               |
| Enable TLS                        | Boolean | No       | `false`   | Whether or not to use TLS when connecting to Redis.                                                                                                               |
| Skip TLS Certificate Verification | Boolean | No       | `false`   | Skip TLS certificate verification. Only shown when Enable TLS is true.                                                                                            |
| TLS Certificate Authority File    | String  | No       | *(empty)* | Optional certificate authority file used to validate the server's certificate. Only shown when Enable TLS is true and Skip TLS Certificate Verification is false. |
| Mutual TLS                        | Boolean | No       | `false`   | Whether or not to use client TLS authentication (mTLS). Only shown when Enable TLS is true.                                                                       |
| TLS Client Certificate File       | String  | Yes \*   | *(empty)* | A path to the client certificate to be used for mutual TLS. Required and only shown when Enable TLS and Mutual TLS are both true.                                 |
| TLS Client Private Key            | String  | Yes \*   | *(empty)* | A path to the client private key to be used for mutual TLS. Required and only shown when Enable TLS and Mutual TLS are both true.                                 |

\* Required only when both Enable TLS and Mutual TLS are enabled.

### Examples

#### Persist to a remote Redis with a custom database, expiration, and key prefix

This example connects to a remote Redis instance and exercises several Advanced parameters: a non-default **Database** (`1`), an **Expiration** TTL (`3600` seconds), and a **Key Prefix** (`bindplane`) so the collector's keys do not collide with other Redis users. **Enable TLS** is turned on with **Skip TLS Certificate Verification** left off so the server certificate is validated.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Extension
metadata:
  name: redis-storage
spec:
  type: redis_storage
  parameters:
    - name: endpoint
      value: redis.example.com:6379
    - name: db
      value: 1
    - name: expiration
      value: 3600
    - name: prefix
      value: bindplane
    - name: enable_tls
      value: true
```

### Configuration Tips

* Set a **Key Prefix** when more than one collector or application shares the same Redis database, so each writer's keys stay distinct.
* Leave **Expiration** at `0` for queue and stateful-processor data you expect to survive indefinitely. A non-zero TTL silently drops entries Redis considers expired.
* Enable TLS for any Redis instance reached over an untrusted network, and prefer leaving **Skip TLS Certificate Verification** off so the server certificate is validated.

### Troubleshooting

#### State is not retained across collector restarts

Symptoms: queues drain to empty or stateful processors relearn from scratch after a restart.

Solutions:

1. Confirm the **Endpoint** is reachable from the collector host and that any **Password** and **Database** index are correct.
2. Check that **Expiration** is not set lower than the gap between restarts. A short TTL can expire entries before they are read back.

#### Connection fails when TLS is enabled

Symptoms: the collector cannot connect to Redis once **Enable TLS** is on.

Solutions:

1. Verify the Redis server is actually listening for TLS connections on the configured endpoint.
2. With **Mutual TLS** enabled, confirm both the **TLS Client Certificate File** and **TLS Client Private Key** paths exist and are readable by the collector, and that the **TLS Certificate Authority File** matches the server's certificate chain.

### Standalone Extension

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Extension
metadata:
  name: redis-storage
spec:
  type: redis_storage
  parameters:
    - name: endpoint
      value: redis.example.com:6379
    - name: password
      value: secret
    - name: db
      value: 1
    - name: expiration
      value: 3600
    - name: prefix
      value: bindplane
    - name: enable_tls
      value: true
    - name: insecure_skip_verify
      value: false
    - name: ca_file
      value: /etc/otel/ca.crt
    - name: mutual_tls
      value: true
    - name: cert_file
      value: /etc/otel/client.crt
    - name: key_file
      value: /etc/otel/client.key
```

### Related Resources

* [Persistent Queue](/configuration/bindplane-otel-collector/persistent-queue.md) — uses a storage extension to buffer telemetry to disk or Redis so data survives restarts.
* [Drain processor](/integrations/processors/drain.md) — can persist learned log templates to a storage extension so they are retained across restarts.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/extensions/redis-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
