Skip to main content
Version: 1.3.0

Redis

Pull Push

Synopsis​

Creates a Pub/Sub subscriber that connects to Redis servers and processes messages from specified channels. Supports authentication, TLS encryption, and multiple workers with automatic message handling.

Schema​

- id: <numeric>
name: <string>
description: <string>
type: redis
tags: <string[]>
pipelines: <pipeline[]>
status: <boolean>
properties:
address: <string>
port: <numeric>
username: <string>
password: <string>
channel: <string>
reuse: <boolean>
workers: <numeric>
buffer_size: <numeric>
tls:
status: <boolean>
cert_name: <string>
key_name: <string>

Configuration​

The following fields are used to define the device:

Device​

FieldRequiredDefaultDescription
idYUnique identifier
nameYDevice name
descriptionN-Optional description
typeYMust be redis
tagsN-Optional tags
pipelinesN-Optional pre-processor pipelines
statusNtrueEnable/disable the device

Connection​

FieldRequiredDefaultDescription
addressN"0.0.0.0"Redis server address
portYRedis server port
usernameN-Authentication username
passwordN-Authentication password
channelYChannel pattern to subscribe to

TLS​

FieldRequiredDefaultDescription
tls.statusNfalseEnable TLS encryption
tls.cert_nameYTLS certificate file path (required if TLS enabled)
tls.key_nameYTLS private key file path (required if TLS enabled)
note

The TLS certificate and key files must be placed in the service root directory.

Performance​

FieldRequiredDefaultDescription
reuseNfalseEnable multi-worker mode
workersN4Number of worker processes when reuse enabled
buffer_sizeN9000Read buffer size in bytes

Advanced Features​

The following are unique features that Director offers.

Channel Patterns​

The collector supports Redis Pub/Sub channel consuming with exact matching (e.g. logs) and single- or multi-pattern matching (e.g. logs.* or logs.* app.*).

Multiple Workers​

When reuse is enabled, the collector uses multiple workers which maintain their own Redis subscriptions and process messages independently thanks to which messages are automatically distributed.

note

The worker count is capped at the number of available CPU cores.

Messages​

The collector supports pattern-based subscriptions, multiple channel subscriptions, and custom message processing pipelines. It also supports TLS-encrypted connections and authentication methods.

Examples​

The following are commonly used configuration types.

Basic​

A basic collector can be easily created:

Creating a simple Redis subscriber...

devices:
- id: 1
name: basic_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
channel: "logs"

Secure​

The collector can connect to secure Redis servers:

Connecting with authentication and encryption...

devices:
- id: 2
name: secure_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
username: "subscriber"
password: "secret"
channel: "secure.logs"
tls:
status: true
cert_name: "redis.crt"
key_name: "redis.key"

High-Volume​

Performance can be enhanced for high message volumes:

Optimizing for high throughput...

devices:
- id: 3
name: performant_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
channel: "high-volume"
reuse: true
workers: 4
buffer_size: 32768

Pattern Subscription​

Messages can be filtered using pattern-based matching:

Configuring pattern-based subscriptions...

devices:
- id: 4
name: pattern_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
channel: "logs.*"
reuse: true
workers: 2
tip

Redis channel patterns support the * wildcard character for matching multiple channels.

Pipelines​

Messages can be pre-processed:

Applying custom processing to messages...

devices:
- id: 5
name: pipeline_redis
type: redis
pipelines:
- json_parser
- field_extractor
properties:
address: "redis.example.com"
port: 6379
channel: "raw.logs"
note

Pipelines are processed sequentially, and can modify or drop messages before ingestion.