Docs » Configure application receivers » Configure application receivers for databases » Redis

Redis 🔗

Description 🔗

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

The Redis monitor accepts endpoints and allows multiple instances. It monitors a Redis instance using the Python Redis plugin. This monitor supports Redis 2.8 and later.

With this monitor, you can capture the following Redis metrics:

  • Memory used

  • Commands processed per second

  • Number of connected clients and slaves

  • Number of blocked clients

  • Number of keys stored (per database)

  • Uptime

  • Changes since last save

  • Replication delay (per slave)

See Redis for the monitor source.

Installation 🔗

This monitor is available in the SignalFx Smart Agent Receiver, which is part of the Splunk Distribution of OpenTelemetry Collector.

To install this integration:

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

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

Configuration 🔗

The Splunk Distribution of OpenTelemetry Collector allows embedding a Smart Agent monitor configuration in an associated Smart Agent Receiver instance.

Note: Providing a Redis monitor entry in your Smart Agent or Collector configuration is required for its use. Use the appropriate form for your agent type.

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

See Smart Agent example configuration for an autogenerated example of a YAML configuration file, with default values where applicable.

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.

See configuration examples for specific use cases that show how the collector can integrate and complement existing environments.

Configuration settings 🔗

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

Option Required Type Description
pythonBinary no string Path to a python binary that should be used to execute the Python code. If not set, a built-in runtime will be used. Can include arguments to the binary as well.
host yes string
port yes integer
name no string The name for the node is a canonical identifier which is used as plugin instance. It is limited to 64 characters in length. (default: "{host}:{port}")
auth no string Password to use for authentication.
sendListLengths no list of objects (see below) Specify a pattern of keys to lists for which to send their length as a metric. See below for more details.
verbose no bool If true, verbose logging from the plugin will be enabled. (default: false)

The nested sendListLengths configuration object has the following fields:

Option Required Type Description
databaseIndex yes integer The database index.
keyPattern yes string Can be a globbed pattern (only * is supported), in which case all keys matching that glob will be processed. The pattern should be placed in single quotes ('). Ex. 'mylist*'

Monitor the length of Redis lists 🔗

To monitor the length of list keys, the key and database index must be specified in the configuration. Specify keys in the configuration file in the form sendListLengths: [{databaseIndex: $db_index, keyPattern: "$key_name"}]. $key_name can be a globbed pattern (only * is supported), in which case all keys matching that glob will be processed. Don’t forget to surround the pattern with double quotes or else the asterisks might be misinterpreted. If any keys match the glob that are not lists, an error will be sent to the agent logs.

Lengths will be reported to Splunk Observability Cloud under the metric gauge.key_llen, which is a separate time series for each list.

Warning: The KEYS command is used to match the globs, so don’t try and match something that is large, as this command is not highly optimized and can block other commands from executing.

Note: To avoid duplication reporting, this should only be reported in one node. Keys can be defined in either the master or slave configuration.

The following is an example YAML configuration with list lengths:

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

The following is an example Redis Smart Agent monitor configuration:

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

Metrics 🔗

These are the metrics available for this integration.