Redis receiver ๐
The Redis receiver is designed to retrieve Redis INFO
data from a single Redis instance, build metrics from that data, and send them to the next consumer at a configurable interval. The Redis INFO
command returns information and statistics about a Redis server. The Redis receiver extracts values from the result and converts them to OpenTelemetry metrics.
For example, the Redis INFO
command returns used_cpu_sys
, which indicates the system CPU consumed by the Redis server, expressed in seconds, since the start of the Redis instance. The Redis receiver turns this data into a gauge with a metric name of redis.cpu.time
and a unit value of seconds.
For more information, see :
The list of Redis receiver metrics at Metrics
Get started ๐
Follow these steps to configure and activate the component:
Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform:
Configure the receiver creator receiver as described in the next section.
Restart the Collector.
Sample configuration ๐
To activate the Redis receiver manually in the Collector configuration, add redis
to the receivers
section of your configuration file, as shown in the following example:
receivers:
redis:
endpoint: "localhost:6379"
username: "test"
password: "test"
collection_interval: 10s
tls:
insecure: true
To complete the configuration, include the receiver in the metrics
pipeline of the service
section of your configuration file. For example:
service:
pipelines:
metrics:
receivers: [redis]
Configuration settings ๐
The following settings are required:
endpoint
: The hostname and port of the Redis instance, separated by a colon. No default value.
The following settings are optional:
collection_interval
: This receiver runs on an interval. Each time it runs, it queries Redis, creates metrics, and sends them to the next consumer. Thecollection_interval
configuration option tells this receiver the duration between runs.collection_interval
must be a string readable by Golangโs ParseDuration function, such as1h30m
. Valid time units are ns, us (or ยตs), ms, s, m, h.10s
by default.
password
: The password used to access the Redis instance; must match the password specified in the requirepass server configuration option. No default value.transport
: Defines the network to use for connecting to the server:tcp
orunix
.tcp
by default.tls
:insecure
: Whether to disable client transport security for the exporterโs connection.true
by default.ca_file
: The path to the CA certification. For a client this verifies the server certificate.Only use if
insecure
is set tofalse
.
cert_file
: The path to the TLS certification to use for TLS required connections.Only use if
insecure
is set tofalse
.
key_file
: The path to the TLS key to use for TLS required connections.Only use if
insecure
is set tofalse
.
Configure the receiver using environment variables ๐
In OpenTelemetry you can configure any component using environment variables. For example, to pick up the value of an environment variable REDIS_PASSWORD
, use:
receivers:
redis:
endpoint: "localhost:6379"
collection_interval: 10s
password: ${env:REDIS_PASSWORD}
Settings ๐
The following table shows the configuration options for the Redis receiver:
Metrics ๐
The following metrics, resource attributes, and attributes are available.
Troubleshooting ๐
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
Submit a case in the Splunk Support Portal .
Contact Splunk Support .
Available to prospective customers and free trial users
Ask a question and get answers through community support at Splunk Answers .
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.