Redis monitoring
This extension documentation is now deprecated and will no longer be updated. We recommend using the new Redis Enterprise extension for improved functionality and support.
Redis is an open-source, in-memory, key-value database (or "data structure server") with optional durability. Redis is commonly used as a database, cache, queue, and message broker (publish and subscribe). Out of the box, Dynatrace monitors the top Redis metrics, including response time, memory fragmentation, cache hit ratio, cache usage, number of connections, hits, misses, and more.
Requirements and limitations
- Redis Server 2.8 or higher
- Linux OS
- Redis must listen on localhost. Binding between localhost and the Redis port is required.
- If you have multiple Redis instances on a single host, all instances must have the same password (or no password).
- This extension does not support TLS.
Docker support
Dynatrace supports Redis running inside Docker containers with the following requirements:
- Dynatrace OneAgent version 1.157+
- Redis docker image version 5.0.0+
- If you use a configuration file for the rename-command operation, you need to use its path in Monitored Extension configuration. For example:
docker run redis
Enabling Redis monitoring globally
With Redis monitoring enabled globally, Dynatrace automatically collects Redis metrics whenever a new host running Redis is detected in your environment.
- Go to Settings.
- Select Monitoring > Monitored technologies.
- Open the Redis entry for editing.
- Connected to shows you how many Redis hosts are connected and offers links directly to the host pages.
- Password is the password to all Redis hosts you want to monitor globally. Define a password (or leave the field blank if the password has not been set on the Redis server). If you have multiple Redis instances on a single host, all instances must have the same password (or no password).
- Config file location is an optional configuration file.
The host settings link opens Settings > Monitoring > Monitoring overview to the Hosts tab. If you decide to configure Redis per host rather than globally, switch Redis monitoring off globally and select the host settings to begin configuring Redis per host. See Enabling Redis monitoring for individual hosts below for details.
- Select Save to save any changes.
- Turn on the Redis switch to start Redis global monitoring.
Enabling Redis monitoring for individual hosts
You can enable Redis monitoring for specific hosts rather than globally.
- Go to Settings.
- Select Monitoring > Monitoring overview.
- Select the Hosts tab.
- Select the host on which you want to configure Redis.
- Select Edit and wait for the Monitored technologies list to populate.
If Redis is listed as one of the globally monitored technologies, you need to turn off global monitoring for Redis and then configure Redis monitoring on the host level. Click the enabled globally link and set the Redis switch to the Off position, then return to host configuration.
- Find the Redis entry in the Monitored technologies list and expand it for editing.
- Password is the password for the selected Redis host you want to monitor.
- Config file location is an optional configuration file for command rewriting.
- Select Save to save any changes.
- Turn on the Redis switch for this host.
- Repeat this procedure for additional Redis hosts as needed.
Monitoring Redis replication
Dynatrace automatically recognizes Redis master and replica instances and monitors their replication. Redis master and replica instances must be fully synchronized to maintain optimal performance and stability of your Redis servers.
The Current status indicator on the Redis process overview page displays the health of your Redis servers. To analyze server status changes over time, select a time frame in the Replica state chart or check the Status chart to see the exact status distributions during a given timeframe.
Use event-specific settings to adjust the conditions under which alerts are sent out to notify you. To access plugin event settings, go to Settings > Anomaly detection > Extension events and find the Redis entries:
- Redis Replica synchronization in progress
If Redis replica synchronization remains in progress for too long, Dynatrace raises this alert. - Redis Replica unsynchronized
If a Redis replica isn’t fully replicated, Dynatrace raises this alert.
You can turn these events on or off, and you can configure the conditions under which a corresponding alert is raised.
Redis Sentinel response time
Redis Sentinel is the name of the process responsible for the availability of your Redis deployment. The performance of the Redis Sentinel process is measured based on Response time.
Process group metrics
To view metric charts on the Redis process group level:
- Go to Technologies & Processes or Technologies & Processes Classic (latest Dynatrace) and then select the Redis tile.
Redis process groups are listed in the table below the tiles, with the following metrics for each row (process group): CPU, connectivity, retransmissions, handshake round-trip time, response throughput. - To chart any of these metrics for a specific process group, select that row to expand it.
Use the list under the chart to select a different metric to chart. - To view details on the selected Redis process group, select the Process group details button.
On the Process group page, select the Technology-specific metrics tab to chart the following metrics for the selected Redis process group:- Memory fragmentation
The ratio of memory used by the operating system compared to the amount of memory allocated by Redis. - Memory usage
The percentage of utilized Redis memory. This metric is visible only when the Redismaxmemory
parameter is configured. - Response time
The time elapsed while the Redis server responds toINFO
requests. Redis typically responds within milliseconds. - Total commands processed
The number of commands processed by Redis per second.
- Memory fragmentation
Key process metrics
Valuable Redis metrics are displayed on each Redis process page within an intuitive infographic.
- On the Process group page, select a process in the table to display the Process details page for that process.
- Select the Redis metrics tab to chart key metrics for the selected Redis server instance.
- Response time
The time elapsed while the Redis server responds toINFO
requests. Redis typically responds within milliseconds. - Memory fragmentation
The ratio of memory used by the operating system compared to the amount of memory allocated by Redis.- Less than
1.0
indicates that Redis requires more memory than is available on the system and is forced to use swap memory resources. - Slightly more than
1.0
(but not exceeding1.5
) is a healthy fragmentation ratio. Fragmentation is taking place and this Redis instance is consuming more physical memory than has been requested, but fragmentation is not excessive. - Greater than
1.5
indicates excessive fragmentation. To allow the operating system to recover memory that has become unusable due to fragmentation, restart the Redis server.
- Less than
- Response time
Additional Redis process metrics charts
On the Process details page, select the Further details tab to show the following additional metrics for the selected Redis server instance:
Cache
Commands
- Keyspace hits
Number of successful key lookups in the main dictionary. - Keyspace misses
Number of failed key lookups. - Total commands processed
Number of commands processed by Redis per second.
Memory
- Used memory
Percentage of utilized Redis memory. This metric is visible only when the Redismaxmemory
parameter is configured. - Evicted keys
Number of keys removed from cache to free up memory for new items. An increasing number of evicted keys can be a symptom of high memory usage.
Expired keys Number of key expiration events. Expiration events are triggered when keys are deleted by Redis. Please be aware that expiration events are not triggered once a key’s TTL (Time to Live) status falls to zero.
Connections
Clients
- Connected
Number of client connections (excluding connections from replicas). - Blocked
Number of blocked clients. - Rejected connections
Number of connections rejected because of themaxclients
limit. By default, recent versions of Redis don’t close connections with clients, even when clients are idle for a long time—connections remain open indefinitely. You have the option of configuring a timeout, in which case client connections can be closed when they remain idle for a certain period of time. Timeouts are configured in the fileredis.conf
. - Total connections received
Number of connections accepted by the server.
Replication
- Connected replicas
Number of connected replicas. This metric is visible for the master and those replicas that are connected to other replicas.
Slow log
The slow log records queries that have exceeded their specified execution times.
- Execution time includes only the time required to execute a command query.
- Execution time does not include I/O operations (for example, talking with the client or sending replies).
The slow log can be configured with two parameters:
slowlog-log-slower-than
tells Redis the execution time (in microseconds) that, if exceeded, means the query was slow and will be recorded in the slow log.slowlog-max-len
is the maximum number of queries that are retained in the slow log.
Standard Redis metrics
This table is based on standard metrics descriptions.
Metric
Description
Total commands processed
The number of commands processed by Redis per second.
Memory usage
The percentage of utilized Redis memory. This metric is visible only when the Redis maxmemory
parameter is configured.
Connected
The number of client connections (excluding connections from replicas).
Blocked
The number of blocked clients.
Rejected connections
The number of connections rejected because of the maxclients
limit. By default, recent versions of Redis don’t close connections with clients, even when clients are idle for a long time—connections remain open indefinitely. You have the option of configuring a timeout, in which case client connections can be closed when they remain idle for a certain period of time. Timeouts are configured in the file redis.conf
.
Total connections received
The number of connections accepted by the server.
Connected replicas
The number of connected replicas. This metric is visible for the master and those replicas that are connected to other replicas.
Keyspace hits
The number of successful key lookups in the main dictionary.
Max memory
The maximum memory allowed in Redis cache. You can adjust this parameter as required.
Evicted keys
The number of keys removed from cache to free up memory for new items. An increasing number of evicted keys can be a symptom of high memory usage.
Cache hit ratio
The percentage of key lookups in the main dictionary that were successful.
Expired keys
The number of key expiration events. Expiration events are triggered when keys are deleted by Redis. Expiration events are not triggered once a key’s TTL (Time to Live) status falls to zero.
# of keys
The number of keys in the selected database.
Expires
The number of keys that have the TTL parameter.
Average TTL
The estimated average TTL of keys on the server.
Slow queries
The number of queries recorded in the Redis slow log.
The slow log records queries that have exceeded their specified execution times.
- Execution time includes only the time required to execute a command query.
- Execution time does not include I/O operations (for example, talking with the client or sending replies).
The slow log can be configured with two parameters:
slowlog-log-slower-than
tells Redis the execution time (in microseconds) that, if exceeded, means the query was slow and will be recorded in the slow log.slowlog-max-len
is the maximum number of queries that are retained in the slow log.