Redis monitoring integration

Access to this feature depends on your subscription level. Requires Infrastructure Pro.

New Relic Infrastructure's integrations include a Redis integration that reports your Redis data to New Relic products. This document explains how to install and configure the Redis integration, and describes the data the integration collects.

This integration is released as Open Source under the MIT license on GitHub. A change log is also available there for the latest updates.


New Relic's Redis integration reports critical performance data from your Redis server to New Relic products. You can view this metric data and inventory data in New Relic Infrastructure and Insights. You can view pre-built dashboards of your Redis data, create alert policies, and create custom queries and charts. You can also specify keys that are important to your application and get information about their length.

The integration obtains data by executing Redis commands:

  • INFO command: Data from the INFO command populates metric data and some inventory data.

  • CONFIG GET command: Most inventory data comes from this command.
  • Key length acquisition: Depending on the type of key, these commands are used:

For key length data collection, the agent uses pipelining to minimize the impact on your Redis performance. However, if you are collecting the length of many keys, your Redis performance may be affected. For this reason, the agent includes a default key limit (but this limit can be overwritten).

If you edited the names of the Redis commands mentioned above, the integration will not be able to retrieve the Redis data.

Compatibility and requirements

To use the Redis integration, ensure your system meets these requirements:

Install and activate

On-host integrations do not automatically update. For best results, you should occasionally update the integration and update the Infrastructure agent.

To install the Redis integration:

  1. Follow the instructions for installing an integration, using the file name nri-redis.

  2. Via the command line, change the directory to the integrations configuration folder:

    cd /etc/newrelic-infra/integrations.d
  3. Create a copy of the sample configuration file by running:

    sudo cp redis-config.yml.sample redis-config.yml
  4. Edit the redis-config.yml config file based on your Redis server connection methods:

    Connect with Unix socket

    If you connect using Unix socket, specify the unix_socket_path in the configuration file.

    Be sure that the user executing the Redis integration has correct permissions for accessing that Unix socket. The permissions of the Unix socket are set in the Redis configuration (value of unixsocketperm).

    Connect with TCP

    If you connect via TCP, the config file is by default set to localhost and port 6379. You can change this by specifying hostname and/or the port argument. If you use this method, the unix_socket_path parameter cannot be set.

  5. If required: Set other configuration file settings based on your Redis setup, as described in Configuration.
  6. Restart the Infrastructure agent.

It is also possible to manually install integrations from a tarball file. For more information, see Install manually from a tarball archive.

Configure the integration

New Relic's Redis integration includes commands and arguments for setting up required Redis login information and configuring how data is reported from Redis. You would normally set these configuration steps as part of the Install process. The exact configuration will depend on your Redis setup and preferences.


metrics reports the metric data. Accepts these arguments:

  • hostname: Redis server hostname. Default value: localhost.
  • port: Port where Redis server is listening. Default value: 6379.
  • unix_socket_path: Unix socket path on which Redis server is listening (if set). Default value: None.
  • keys: List of the keys for retrieving their lengths. Default value: None. See keyspace config for more information.
  • keys_limit: Max number of the keys to retrieve their lengths. Default value: 30. For more information, see About this integration and Keyspace metrics configuration.
  • password: Password to use when connecting to the Redis server. Use only if your Redis server is password-protected. Default value: None.

inventory captures all the Redis configuration parameters, with the exception of requirepass. To disable collection of inventory data, delete the inventory command from the config file.


If you want to see metrics related to the length of selected keys, specify the keys parameter in single-line JSON format in redis-config.yml. For example:

keys: '{"0":["KEY_1"],"1":["KEY_2"]}'

If your selected keys are stored only in Redis database 0, then you can set the keys parameter as follows:

keys: '["KEY_1","KEY_2"]'

The keys_limit parameter defaults to 30 for performance reasons. Be aware that increasing this number could have a substantial impact on your Redis server performance.

To see the keyspace metric data that is collected, see RedisKeyspaceSample.

Activating remote monitoring

For version 1.1.0 or higher, a new configuration parameter called remote_monitoring enables remote monitoring and multi-tenancy for this integration.

Activating remote_monitoring may change some attributes and/or affect your configured alerts. For more information, see remote monitoring in on-host integrations.

*Infrastructure agent version 1.2.25 or higher is required to use remote_monitoring.

Environment variable passthroughs

Environment variables can be used to control config settings, and are then passed through to the Infrastructure agent. For instructions on how to use this feature, see Configure the Infrastructure agent.


Redis server hostname.

Type String
Default localhost



The port where Redis server is listening.

Type Integer
Default 6379



Unix socket path on which Redis server is listening (if set).

Type String
Default (none)



List of the keys for retrieving their lengths.

Default (none)



Max number of the keys to retrieve their lengths.

Type Integer
Default 30



Password to use when connecting to the Redis server.

Type String
Default (none)



Find and use data

To find your integration data in Infrastructure, go to > Third-party services and select one of the Redis integration links.

In New Relic Insights, Redis data is attached to the RedisSample and RedisKeyspaceSample event types.

For more on how to find and use your data, see Understand integration data.


The Redis integration collects the following metric data attributes:

These attributes can be found by querying the RedisSample event types in Insights.

Name Description
cluster.connectedSlaves Number of connected slaves.
db.aofLastRewriteTimeInMilliseconds Duration of the last AOF rewrite operation in milliseconds.
db.aofLastBgrewriteStatus Boolean representing status of the last AOF background rewrite operation.
db.aofLastWriteStatus Boolean representing status of the last AOF write operation.
db.evictedKeysPerSecond Number of evicted keys due to maxmemory limit per second.
db.expiredKeysPerSecond Number of key expiration events per second.
db.keyspaceHitsPerSecond Number of successful lookups of keys in the main dictionary per second.
db.keyspaceMissesPerSecond Number of failed lookup of keys in the main dictionary per second.
db.latestForkUsecMilliseconds Duration of the latest fork operation in milliseconds.
db.rdbBgsaveInProgress Boolean. A flag indicating a RDB save is ongoing.
db.rdbChangesSinceLastSave Number of changes since the last dump.
db.rdbLastBgsaveStatus Boolean representing the status of the last RDB save operation.
db.rdbLastBgsaveTimeMilliseconds Duration of the last RDB save operation in milliseconds.
db.rdbLastSaveTime Epoch-based timestamp of last successful RDB save in seconds.
db.syncFull Count of the number times slaves have fully synchronized with this master.
db.syncPartialErr Count of the number of times partial syncs have failed to complete.
db.syncPartialOk Count of the number of times partial syncs have completed.
net.blockedClients Number of clients pending on a blocking call (BLPOP, BRPOP, BRPOPLPUSH).
net.clientBiggestInputBufBytes The biggest input buffer among current client connections.
net.clientLongestOutputList The longest output list among current client connections.
net.commandsProcessedPerSecond Number of commands processed by the server per second.
net.connectedClients Number of client connections (excluding connections from slaves).
net.connectionsReceivedPerSecond Number of connections accepted by the server per second.
net.inputBytesPerSecond Total number of bytes input per second.
net.outputBytesPerSecond Total number of bytes output per second.
net.pubsubChannels Global number of pub/sub channels with client subscriptions.
net.pubsubPatterns Global number of pub/sub pattern with client subscriptions.
net.rejectedConnectionsPerSecond Number of connections per second rejected because of maxclients limit.
software.uptimeMilliseconds Number of milliseconds since Redis server start.
system.memFragmentationRatio Ratio between used_memory_rss and used_memory.
system.totalSystemMemoryBytes The amount of memory in bytes available in the instance where Redis is running.
system.usedCpuSysMilliseconds System CPU consumed by the Redis server in milliseconds.
system.usedCpuSysChildrenMilliseconds System CPU consumed by the background processes in milliseconds.
system.usedCpuUserMilliseconds User CPU consumed by the Redis server in milliseconds.
system.usedCpuUserChildrenMilliseconds User CPU consumed by the background processes in milliseconds.
system.usedMemoryBytes The total number of bytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc).
system.usedMemoryLuaBytes Number of bytes used by the Lua engine.
system.usedMemoryPeakBytes The peak memory consumed by Redis in bytes.
system.usedMemoryRssBytes Number of bytes that Redis allocated as seen by the operating system (also known as resident set size). This is the number reported by tools such as top(1) and ps(1).

The Redis integration collects the following keyspace metadata and metrics. These attributes can be found by querying the RedisKeyspaceSample event type in Insights.

Name Description
db.avgTtl The average time to live (TTL) in milliseconds of keys that have an expiration set in the database being reported on.
db.keys Number of keys in the database being reported on.
db.keyspace Redis database index, which is the integer number (usually a number between 0 and 15). Format: db followed by the database index. For example: db0, db1, db2, etc.
db.expires Number of keys with an expiration in the database being reported on.

Inventory data

Inventory data includes everything reported by the Redis CONFIG GET command, with the exception of requirepass, which stores the password to the Redis server. For more on inventory data, see Understand inventory data.

Other system data

The Redis integration collects these additional attributes about your Redis service:

Name Description
software.version The version of the Redis server. Example: 3.2.3.
cluster.role Either master or slave, depending on the role of the Redis node being monitored.

For more help

Recommendations for learning more: