Docs » Available host and application monitors » Configure application receivers for databases » Redis

Redis πŸ”—

Description πŸ”—

The Splunk Distribution of OpenTelemetry Collector deploys this integration as the Redis monitor type using the Smart Agent Receiver.

Using the Redis monitor, you can capture the following metrics:

  • Memory used

  • Commands processed per second

  • Number of connected clients and followers

  • Number of blocked clients

  • Number of keys stored per database

  • Uptime

  • Changes since last save

  • Replication delay per follower

This monitor is available on Kubernetes, Windows, and Linux. It accepts endpoints and allows multiple instances.

Requirements πŸ”—

The monitor supports Redis 2.8 and higher.

Benefits πŸ”—

After you configure the integration, you can access these features:

Installation πŸ”—

Follow these steps to deploy this integration:

  1. Deploy the Splunk Distribution of OpenTelemetry Collector to your host or container platform:

  2. Configure the monitor, as described in the Configuration section.

  3. Restart the Splunk Distribution of OpenTelemetry Collector.

Configuration πŸ”—

This monitor type is available in the Smart Agent Receiver, which is part of the Splunk Distribution of OpenTelemetry Collector. You can use existing Smart Agent monitors as OpenTelemetry Collector metric receivers with the Smart Agent Receiver.

This monitor type requires a properly configured environment on your system in which you’ve installed a functional Smart Agent release bundle. The Collector provides this bundle in the installation paths for x86_64/amd64.

To activate this monitor type in the Collector, add the following lines to your configuration (YAML) file:

Note

Provide a Redis monitor entry in your Smart Agent or Collector configuration. Use the appropriate form for your agent type.

Splunk Distribution of OpenTelemetry Collector πŸ”—

To activate this monitor in the Splunk Distribution of OpenTelemetry Collector, add the following to your agent configuration:

receivers:
  smartagent/redis:
    type: collectd/redis
    ...  # Additional config

To complete the monitor activation, you must also include the smartagent/redis receiver item in a metrics pipeline. To do this, add the receiver item to the service > pipelines > metrics > receivers section of your configuration file. For example:

service:
  pipelines:
    metrics:
      receivers: [smartagent/redis]

Smart Agent πŸ”—

To activate this monitor in the Smart Agent, add the following to your agent configuration:

monitors:  # All monitor config goes under this key
  - type: collectd/redis
    ...  # Additional config

The following example shows you a YAML configuration file for the Smart Agent:

monitors:
- type: collectd/redis
  host: 127.0.0.1
  port: 9100

The next example shows you a YAML configuration file that includes list length monitoring:

monitors:
- type: collectd/redis
  host: 127.0.0.1
  port: 9100
  sendListLengths:
  - databaseIndex: 0
    keyPattern: 'mylist*'

See Install and configure the SignalFx Smart Agent for an autogenerated example of a YAML configuration file, with default values where applicable.

Configuration settings πŸ”—

The following table shows the configuration options for the Redis monitor:

Option

Required

Type

Description

host

Yes

string

port

Yes

integer

pythonBinary

No

string

Path to the Python binary. If you don’t provide a path, the monitor uses its built-in runtime. The string can include arguments to the binary.

name

No

string

Name for the Redis instance. The maximum length is 64 characters. The default value is β€œ{host}:{port}”.

auth

No

string

Authentication password.

sendListLengths

No

list of objects (see below)

List of keys that you want to monitor for length. To learn more, see the section Monitor the length of Redis lists.

verbose

No

bool

Flag that controls verbose logging for the plugin. If true, verbose logging is enabled. The default value isfalse.

The following table shows you the configuration options for the sendListLengths configuration object:

Option

Required

Type

Description

databaseIndex

Yes

integer

The database index

keyPattern

Yes

string

A string or pattern to use for selecting keys. A string selects a single key. A pattern that uses * as a glob style wildcard processes all keys that match the pattern. Surround a pattern with single quotes (β€˜), for example 'mylist*'

Monitor the length of Redis lists πŸ”—

To monitor the length of list keys, you must specify the key and database index in the configuration using the following syntax:

sendListLengths: [{databaseIndex: $db_index, keyPattern: "$key_name"}]

You can specify $key_name as a glob-style pattern. The only supported wildcard is * . When you use a pattern, the configuration processes all keys that match the pattern.

To ensure that the * is interpreted correctly, surround the pattern with double quotes (""). When a nonlist key matches the pattern, the Redis monitor writes an error to the agent logs.

In Observability Cloud, gauge.key_llen is the metric name for Redis list key lengths. Observability Cloud creates a separate MTS for each Redis list.

Notes:

  1. The Redis monitor uses the KEYS command to match patterns. Because this command isn’t optimized, you need to keep your match patterns small. Otherwise, the command can block other commands from executing.

  2. To avoid duplicate reporting, choose a single node in which to monitor list lengths. You can use the main node configuration or a follower node configuration.

Metrics πŸ”—

The following metrics are available for this integration:

Database Query Performance πŸ”—

You can troubleshoot Redis command performance issues using Database Query Performance in Splunk APM.

Get help πŸ”—

If you are not able to see your data in Splunk Observability Cloud, try these tips:

To learn about even more support options, see Splunk Customer Success.