Redis

Supported OS Linux Windows Mac OS

Integration version8.2.0

Overview

Whether you use Redis as a database, cache, or message queue, this integration tracks problems with your Redis servers, cloud service, and the parts of your infrastructure they serve. Use the Datadog Agent’s Redis check to collect metrics related to:

  • Performance
  • Memory usage
  • Blocked clients
  • Secondary connections
  • Disk persistence
  • Expired and evicted keys
  • and many more

Minimum Agent version: 6.0.0

Setup

Installation

The Redis check is included in the Datadog Agent package, so you don’t need to install anything else on your Redis servers.

Configuration

Host

To configure this check for an Agent running on a host:

Metric collection
  1. Edit the redisdb.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory. The following parameters may require updating. See the sample redisdb.d/conf.yaml for all available configuration options.

    init_config:
    instances:
      ## @param host - string - required
      ## Enter the host to connect to.
      - host: localhost
        ## @param port - integer - required
        ## Enter the port of the host to connect to.
        port: 6379
    
        ## @param username - string - optional
        ## The username to use for the connection. Redis 6+ only.
        #
        # username: <USERNAME>
    
        ## @param password - string - optional
        ## The password to use for the connection.
        #
        # password: <PASSWORD>
    
  2. If using Redis 6+ and ACLs, ensure that the user has at least DB Viewer permissions at the Database level, Cluster Viewer permissions if operating in a cluster environment, and +config|get +info +slowlog|get ACL rules. For more details, see Database access control.

  3. Restart the Agent.

Log collection

Available for Agent versions >6.0

  1. Collecting logs is disabled by default in the Datadog Agent, enable it in your datadog.yaml file:

    logs_enabled: true
    
  2. Uncomment and edit this configuration block at the bottom of your redisdb.d/conf.yaml:

    logs:
      - type: file
        path: /var/log/redis_6379.log
        source: redis
        service: myapplication
    

    Change the path and service parameter values and configure them for your environment. See the sample redisdb.yaml for all available configuration options.

  3. Restart the Agent.

Trace collection

Datadog APM integrates with Redis to see the traces across your distributed system. Trace collection is enabled by default in the Datadog Agent v6+. To start collecting traces:

  1. Enable trace collection in Datadog.
  2. Instrument your application that makes requests to Redis.

Docker

To configure this check for an Agent running on a container:

Metric collection

Set Autodiscovery Integrations Templates as Docker labels on your application container:

LABEL "com.datadoghq.ad.check_names"='["redisdb"]'
LABEL "com.datadoghq.ad.init_configs"='[{}]'
LABEL "com.datadoghq.ad.instances"='[{"host":"%%host%%","port":"6379","password":"%%env_REDIS_PASSWORD%%"}]'

Note: The "%%env_<ENV_VAR>%%" template variable logic is used to avoid storing the password in plain text, hence the REDIS_PASSWORD environment variable must be set on the Agent container. See the Autodiscovery Template Variable documentation for more details. Alternatively, the Agent can leverage the secrets package to work with any secrets management backend (such as HashiCorp Vault or AWS Secrets Manager).

Log collection

Available for Agent versions >6.0

Collecting logs is disabled by default in the Datadog Agent. To enable it, see Docker Log Collection.

Then, set Log Integrations as Docker labels:

LABEL "com.datadoghq.ad.logs"='[{"source":"redis","service":"<YOUR_APP_NAME>"}]'
Trace collection

APM for containerized apps is supported on Agent v6+ but requires extra configuration to begin collecting traces.

Required environment variables on the Agent container:

ParameterValue
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

See Tracing Docker Applications for a complete list of available environment variables and configuration.

Then, instrument your application container that makes requests to Redis and set DD_AGENT_HOST to the name of your Agent container.

Kubernetes

To configure this check for an Agent running on Kubernetes:

Metric collection

To collect metrics, set the following parameters and values in an Autodiscovery template. You can do this with Kubernetes Annotations (shown below) on your Redis pod(s), or with a local file, ConfigMap, key-value store, Datadog Operator manifest, or Helm chart.

ParameterValue
<INTEGRATION_NAME>["redisdb"]
<INIT_CONFIG>[{}]
<INSTANCE_CONFIG>[{"host": "%%host%%","port":"6379","password":"%%env_REDIS_PASSWORD%%"}]

Annotations v1 (for Datadog Agent < v7.36)

apiVersion: v1
kind: Pod
metadata:
  name: redis
  annotations:
    ad.datadoghq.com/redis.check_names: '["redisdb"]'
    ad.datadoghq.com/redis.init_configs: '[{}]'
    ad.datadoghq.com/redis.instances: |
      [
        {
          "host": "%%host%%",
          "port":"6379",
          "password":"%%env_REDIS_PASSWORD%%"
        }
      ]
  labels:
    name: redis
spec:
  containers:
    - name: redis
      image: redis:latest
      ports:
        - containerPort: 6379

Annotations v2 (for Datadog Agent v7.36+)

apiVersion: v1
kind: Pod
metadata:
  name: redis
  annotations:
    ad.datadoghq.com/redis.checks: |
      {
        "redisdb": {
          "init_config": {},
          "instances": [
            {
              "host": "%%host%%",
              "port":"6379",
              "password":"%%env_REDIS_PASSWORD%%"
            }
          ]
        }
      }
  labels:
    name: redis
spec:
  containers:
    - name: redis
      image: redis:latest
      ports:
        - containerPort: 6379

Note:

  • If no user is specified in the configuration, the Redis integration authenticates with the default user. The password specified in the configuration therefore applies to default user.
  • The "%%env_<ENV_VAR>%%" template variable logic is used to avoid storing the password in plain text, hence the REDIS_PASSWORD environment variable must be set on the Agent container. See the Autodiscovery Template Variable documentation. Alternatively, the Agent can leverage the secrets package to work with any secrets management backend (such as HashiCorp Vault or AWS Secrets Manager).
Log collection

Available for Agent versions >6.0

Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes Log Collection.

Then, set the following parameter in an Autodiscovery template. You can do this with Kubernetes Annotations (shown below) on your Redis pod(s), or with a local file, ConfigMap, key-value store, Datadog Operator manifest, or Helm chart.

ParameterValue
<LOG_CONFIG>[{"source":"redis","service":"<YOUR_APP_NAME>"}]

Annotations v1/v2

apiVersion: v1
kind: Pod
metadata:
  name: redis
  annotations:
    ad.datadoghq.com/redis.logs: '[{"source":"redis","service":"<YOUR_APP_NAME>"}]'
  labels:
    name: redis
spec:
  containers:
    - name: redis
      image: redis:latest
      ports:
        - containerPort: 6379
Trace collection

APM for containerized apps is supported on hosts running Agent v6+ but requires extra configuration to begin collecting traces.

Required environment variables on the Agent container:

ParameterValue
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

See Tracing Kubernetes Applications and the Kubernetes Daemon Setup for a complete list of available environment variables and configuration.

Then, instrument your application container that makes requests to Redis.

ECS

To configure this check for an Agent running on ECS:

Metric collection

Set Autodiscovery Integrations Templates as Docker labels on your application container:

{
  "containerDefinitions": [{
    "name": "redis",
    "image": "redis:latest",
    "dockerLabels": {
      "com.datadoghq.ad.check_names": "[\"redisdb\"]",
      "com.datadoghq.ad.init_configs": "[{}]",
      "com.datadoghq.ad.instances": "[{\"host\":\"%%host%%\",\"port\":\"6379\",\"password\":\"%%env_REDIS_PASSWORD%%\"}]"
    }
  }]
}

Note: The "%%env_<ENV_VAR>%%" template variable logic is used to avoid storing the password in plain text, hence the REDIS_PASSWORD environment variable must be set on the Agent container. See the Autodiscovery Template Variable documentation. Alternatively, the Agent can leverage the secrets package to work with any secrets management backend (such as HashiCorp Vault or AWS Secrets Manager).

Log collection

Available for Agent versions >6.0

Collecting logs is disabled by default in the Datadog Agent. To enable it, see ECS Log Collection.

Then, set Log Integrations as Docker labels:

{
  "containerDefinitions": [{
    "name": "redis",
    "image": "redis:latest",
    "dockerLabels": {
      "com.datadoghq.ad.logs": "[{\"source\":\"redis\",\"service\":\"<YOUR_APP_NAME>\"}]"
    }
  }]
}
Trace collection

APM for containerized apps is supported on Agent v6+ but requires extra configuration to begin collecting traces.

Required environment variables on the Agent container:

ParameterValue
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

See Tracing Docker Applications for a complete list of available environment variables and configuration.

Then, instrument your application container that makes requests to Redis and set DD_AGENT_HOST to the EC2 private IP address.

Validation

Run the Agent’s status subcommand and look for redisdb under the Checks section.

Data Collected

Metrics

redis.acl.denied.auth
(gauge)
Number of authentication failures
redis.acl.denied.channel
(gauge)
Number of commands rejected because of access denied to a channel
redis.acl.denied.cmd
(gauge)
Number of commands rejected because of access denied to the command
redis.acl.denied.key
(gauge)
Number of commands rejected because of access denied to a key
redis.active_defrag.hits
(gauge)
Number of value reallocations performed by the active defragmentation process.
Shown as operation
redis.active_defrag.key_hits
(gauge)
Number of keys that were actively defragmented.
Shown as key
redis.active_defrag.key_misses
(gauge)
Number of keys that were skipped by.
Shown as key
redis.active_defrag.misses
(gauge)
Number of aborted value reallocations started by the active defragmentation process.
Shown as operation
redis.active_defrag.running
(gauge)
Whether active defragmentation is running or not.
redis.allocator.active
(gauge)
Total bytes in the allocator active pages, this includes external-fragmentation
Shown as byte
redis.allocator.allocated
(gauge)
Total bytes allocated form the allocator, including internal-fragmentation. Normally the same as redis.mem.used.
Shown as byte
redis.allocator.debug.active_lua
(gauge)
Total bytes in the allocator active pages specifically for Lua, including external-fragmentation.
Shown as byte
redis.allocator.debug.allocated_lua
(gauge)
Total bytes allocated from the allocator specifically for Lua, including internal-fragmentation.
Shown as byte
redis.allocator.debug.frag_bytes_lua
(gauge)
Delta between redis.allocator.debug.active_lua and redis.allocator.debug.allocated_lua.
Shown as byte
redis.allocator.debug.resident_lua
(gauge)
Total bytes resident (RSS) in the allocator specifically for Lua. This includes pages that can be released to the OS (by MEMORY PURGE, or just waiting).
Shown as byte
redis.allocator.frag_ratio
(gauge)
Ratio between redis.allocator.active and redis.allocator.allocated. This is the true (external) fragmentation metric (not redis.mem.fragmentation_ratio).
Shown as byte
redis.allocator.muzzy
(gauge)
Total bytes of ‘muzzy’ memory (RSS) in the allocator. Muzzy memory is memory that has been freed, but not yet fully returned to the operating system. It can be reused immediately when needed or reclaimed by the OS when system pressure increases.
Shown as byte
redis.allocator.resident
(gauge)
Total byte resident (RSS) in the allocator, this includes pages that can be released to the OS (by MEMORY PURGE, or just waiting).
redis.allocator.rss_bytes
(gauge)
Delta between redis.allocator.resident and redis.allocator.active
Shown as byte
redis.allocator.rss_ratio
(gauge)
Ratio between redis.allocator.resident and redis.allocator.active. This usually indicates pages that the allocator can and probably will soon release back to the OS.
redis.aof.base_size
(gauge)
AOF file size on latest startup or rewrite
Shown as byte
redis.aof.buffer_length
(gauge)
Size of the AOF buffer.
Shown as byte
redis.aof.delayed_fsync
(gauge)
Delayed fsync counter
redis.aof.enabled
(gauge)
Flag indicating AOF logging is activated
redis.aof.last_cow_size
(gauge)
The size in bytes of copy-on-write memory during
Shown as byte
redis.aof.last_rewrite_time
(gauge)
Duration of the last AOF rewrite.
Shown as second
redis.aof.loading_eta_seconds
(gauge)
The estimated amount of time left to load.
Shown as second
redis.aof.loading_loaded_bytes
(gauge)
The amount of bytes to load.
Shown as byte
redis.aof.loading_loaded_perc
(gauge)
The percent loaded.
Shown as percent
redis.aof.loading_total_bytes
(gauge)
The total amount of bytes already loaded.
Shown as byte
redis.aof.pending_bio_fsync
(gauge)
Number of fsync pending jobs in background I/O
redis.aof.pending_rewrite
(gauge)
Flag indicating an AOF rewrite operation
redis.aof.rewrite
(gauge)
Flag indicating a AOF rewrite operation is on-going.
redis.aof.rewrite.buffer_length
(gauge)
Size of the AOF rewrite buffer. Note this field was removed in Redis 7.0
Shown as byte
redis.aof.rewrite.current_time_sec
(gauge)
Duration of the on-going AOF rewrite
Shown as second
redis.aof.rewrite.scheduled
(gauge)
Flag indicating an AOF rewrite operation
redis.aof.rewrites
(gauge)
Number of AOF rewrites performed since startup
redis.aof.size
(gauge)
AOF current file size (redis.aof.size).
Shown as byte
redis.clients.biggest_input_buf
(gauge)
The biggest input buffer among current client connections [v3 & v4].
redis.clients.blocked
(gauge)
The number of connections waiting on a blocking call.
Shown as connection
redis.clients.evicted
(gauge)
Number of evicted clients due to maxmemory-clients limit
redis.clients.longest_output_list
(gauge)
The longest output list among current client connections [v3 & v4].
redis.clients.output_buffer_limit_disconnections
(gauge)
Total number of disconnections due to client reaching output buffer limit
redis.clients.query_buffer_limit_disconnections
(gauge)
Total number of disconnections due to client reaching query buffer limit
redis.clients.recent_max_input_buffer
(gauge)
The biggest input buffer among recent client connections [v5+].
redis.clients.recent_max_output_buffer
(gauge)
The longest output buffer among recent client connections [v5+].
redis.clients.timeout_table
(gauge)
Number of clients in the clients timeout table
redis.clients.watching
(gauge)
Number of clients in watching mode (WATCH)
redis.cluster.connections
(gauge)
An approximation of the number of sockets used by the cluster’s bus
redis.cluster.enabled
(gauge)
Indicate Redis cluster is enabled
redis.command.calls
(gauge)
The number of times a redis command has been called, tagged by ‘command’, e.g. ‘command:append’. Enable in Agent’s redisdb.yaml with the command_stats option.
redis.command.usec_per_call
(gauge)
The CPU time consumed per redis command call, tagged by ‘command’, e.g. ‘command:append’. Enable in Agent’s redisdb.yaml with the command_stats option.
Shown as microsecond
redis.commands.total_processed
(gauge)
Total number of commands processed by the server
redis.cow.current_peak
(gauge)
The peak size in bytes of copy-on-write memory
Shown as byte
redis.cow.current_size
(gauge)
The size in bytes of copy-on-write memory
Shown as byte
redis.cow.current_size_age
(gauge)
The age, in seconds, of the redis.cow.current_size value.
Shown as second
redis.cpu.sys
(gauge)
System CPU consumed by the Redis server.
redis.cpu.sys_children
(gauge)
System CPU consumed by the background processes.
redis.cpu.sys_main_thread
(gauge)
System CPU consumed by the Redis server main thread [v7+].
redis.cpu.user
(gauge)
User CPU consumed by the Redis server.
redis.cpu.user_children
(gauge)
User CPU consumed by the background processes.
redis.cpu.user_main_thread
(gauge)
User CPU consumed by the Redis server main thread [v7+].
redis.defrag.current_active_time
(gauge)
The time passed since memory fragmentation last was over the limit, in milliseconds
Shown as millisecond
redis.defrag.total_active_time
(gauge)
Total time memory fragmentation was over the limit, in milliseconds
Shown as millisecond
redis.errors.total_replies
(gauge)
Total number of issued error replies, that is the sum of rejected commands (errors prior command execution) and failed commands (errors within the command execution)
redis.errors.unexpected_replies
(gauge)
Number of unexpected error replies, that are types of errors from an AOF load or replication
redis.eventloop.cmd_per_cycle_max
(gauge)
The maximal number of commands processed in a single eventloop cycle
redis.eventloop.cycles
(gauge)
Total number of eventloop cycles
redis.eventloop.duration_aof_sum
(gauge)
Total time spent on flushing AOF in eventloop in microseconds.
Shown as microsecond
redis.eventloop.duration_cmd_sum
(gauge)
Total time spent on executing commands in microseconds
Shown as microsecond
redis.eventloop.duration_cron_sum
(gauge)
Total time consumption of cron in microseconds (including serverCron and beforeSleep, but excluding IO and AOF flushing).
Shown as microsecond
redis.eventloop.duration_max
(gauge)
The maximal time spent in a single eventloop cycle in microseconds.
Shown as microsecond
redis.eventloop.duration_sum
(gauge)
Total time spent in the eventloop in microseconds (including I/O and command processing)
Shown as microsecond
redis.eventloop.instantaneous_cycles_per_sec
(gauge)
Number of eventloop cycles per second
redis.eventloop.instantaneous_duration_usec
(gauge)
Average time spent in a single eventloop cycle in microseconds
Shown as microsecond
redis.eviction.current_exceeded_time
(gauge)
The time passed since redis.mem.used last rose above redis.mem.maxmemory, in milliseconds
Shown as millisecond
redis.eviction.total_exceeded_time
(gauge)
Total time redis.mem.used was greater than redis.mem.maxmemory since server startup, in milliseconds
Shown as millisecond
redis.expire_cycle.cpu_milliseconds
(gauge)
The cumulative amount of time spent on active expiry cycles
Shown as millisecond
redis.expired.subkeys
(gauge)
The number of hash field expiration events
redis.expired.time_cap_reached_count
(gauge)
The count of times that active expiry cycles have stopped early
redis.expires
(gauge)
The number of keys with an expiration.
Shown as key
redis.expires.percent
(gauge)
Percentage of total keys with an expiration.
Shown as percent
redis.fork.total
(gauge)
Total number of fork operations since the server start
redis.functions.count
(gauge)
The number of functions [v7+].
redis.info.latency_ms
(gauge)
The latency of the redis INFO command.
Shown as millisecond
redis.key.length
(gauge)
The number of elements in a given key, tagged by key, e.g. ‘key:mykeyname’. Enable in Agent’s redisdb.yaml with the keys option.
redis.keys
(gauge)
The total number of keys.
Shown as key
redis.keys.evicted
(gauge)
The total number of keys evicted due to the maxmemory limit.
Shown as key
redis.keys.expired
(gauge)
The total number of keys expired from the db.
Shown as key
redis.keys.total_blocking
(gauge)
Number of blocking keys [v7.2+].
redis.keys.total_blocking_on_nokey
(gauge)
Number of blocking keys that one or more clients that would like to be unblocked when the key is deleted [v7.2+].
redis.keys.total_watched
(gauge)
Number of watched keys [v7.4+].
redis.libraries.count
(gauge)
The number of libraries [v7+].
redis.loading.loading
(gauge)
Flag indicating if the load of a dump file is on-going
redis.loading.rdb_used_mem
(gauge)
The memory usage of the server that had generated the RDB file at the time of the file’s creation
Shown as byte
redis.loading.start_time
(gauge)
Epoch-based timestamp of the start of the load
redis.mem.clients_normal
(gauge)
The total size in byte of all clients overheads.
Shown as byte
redis.mem.clients_slaves
(gauge)
The total size in byte of all replicas overheads.
Shown as byte
redis.mem.dataset
(gauge)
The size in byte of the dataset.
Shown as byte
redis.mem.fragmentation
(gauge)
Delta between redis.mem.rss and redis.mem.used.
Shown as byte
redis.mem.fragmentation_ratio
(gauge)
Ratio between redis.mem.rss and redis.mem.used.
Shown as fraction
redis.mem.functions
(gauge)
Number of byte overhead by Function scripts (part of redis.mem.used). [v7+].
Shown as byte
redis.mem.lua
(gauge)
Amount of memory used by the Lua engine.
Shown as byte
redis.mem.maxmemory
(gauge)
Maximum amount of memory allocated to the Redisdb system.
Shown as byte
redis.mem.overhead
(gauge)
Sum of all overheads allocated by Redis for managing its internal datastructures [v4+].
Shown as byte
redis.mem.peak
(gauge)
The peak amount of memory used by Redis.
Shown as byte
redis.mem.rss
(gauge)
Amount of memory that Redis allocated as seen by the os.
Shown as byte
redis.mem.scripts
(gauge)
redis.mem.scripts_eval + redis.mem.functions (part of redis.mem.used) [v7+].
Shown as byte
redis.mem.scripts_eval
(gauge)
Number of byte overhead by the EVAL scripts (part of redis.mem.used) [v7+].
Shown as byte
redis.mem.startup
(gauge)
Amount of memory consumed by Redis at startup.
Shown as byte
redis.mem.total_replication_buffers
(gauge)
Total memory consumed for replication buffers [v7+].
Shown as byte
redis.mem.used
(gauge)
Amount of memory allocated by Redis.
Shown as byte
redis.mem.vm_eval
(gauge)
Number of byte used by the script VM engines for EVAL framework (not part of redis.mem.used) [v7+].
Shown as byte
redis.mem.vm_functions
(gauge)
Number of byte used by the script VM engines for Functions framework (not part of redis.mem.used) [v7+].
Shown as byte
redis.mem.vm_total
(gauge)
redis.mem.vm_eval + redis.mem.vm_functions (not part of redis.mem.used) [v7+].
Shown as byte
redis.memory.aof_buffer
(gauge)
Transient memory used for AOF and AOF rewrite buffers
Shown as byte
redis.memory.cluster_links
(gauge)
Memory used by links to peers on the cluster bus when cluster mode is enabled.
Shown as byte
redis.memory.not_counted_for_evict
(gauge)
Used memory that’s not counted for key eviction. This is basically transient replica and AOF buffers.
Shown as byte
redis.memory.overhead_db_hashtable_rehashing
(gauge)
Temporary memory overhead of database dictionaries currently being rehashed [v7.4+].
Shown as byte
redis.memory.peak_time
(gauge)
Time when peak memory was recorded
redis.memory.replication_backlog
(gauge)
Memory used by replication backlog
Shown as byte
redis.memory.rss_overhead_bytes
(gauge)
Delta between redis.mem.rss (the process RSS) and redis.allocator.resident
Shown as byte
redis.memory.rss_overhead_ratio
(gauge)
Ratio between redis.mem.rss (the process RSS) and redis.allocator.resident. This includes RSS overheads that are not allocator or heap related.
Shown as byte
redis.net.clients
(gauge)
The number of connected clients (excluding slaves).
Shown as connection
redis.net.commands
(gauge)
The number of commands processed by the server.
Shown as command
redis.net.commands.instantaneous_ops_per_sec
(gauge)
The number of commands processed by the server per second.
Shown as command
redis.net.connections
(gauge)
The number of connections tagged by client name.
Shown as connection
redis.net.instantaneous_input
(gauge)
The network’s read rate per second in KB/sec.
Shown as kibibyte
redis.net.instantaneous_ops_per_sec
(gauge)
Number of commands processed per second.
Shown as operation
redis.net.instantaneous_output
(gauge)
The network’s write rate per second in KB/sec.
Shown as kibibyte
redis.net.maxclients
(gauge)
The maximum number of connected clients.
Shown as connection
redis.net.migrate_cached_sockets
(gauge)
The number of sockets open for MIGRATE purposes
redis.net.rejected
(gauge)
The number of rejected connections.
Shown as connection
redis.net.slaves
(gauge)
The number of connected slaves.
Shown as connection
redis.net.total_connections_received
(gauge)
Total number of connections accepted by the server.
Shown as connection
redis.net.total_input_bytes
(gauge)
The total number of bytes read from the network
Shown as byte
redis.net.total_output_bytes
(gauge)
The total number of bytes written to the network
Shown as byte
redis.ops.reads_processed
(gauge)
Total number of read events processed
redis.ops.writes_processed
(gauge)
Total number of write events processed
redis.perf.latest_fork_usec
(gauge)
The duration of the latest fork.
Shown as microsecond
redis.persist
(gauge)
The number of keys persisted (redis.keys - redis.expires).
Shown as key
redis.persist.percent
(gauge)
Percentage of total keys that are persisted.
Shown as percent
redis.ping.latency_ms
(gauge)
The latency of the redis PING command.
Shown as millisecond
redis.pubsub.channels
(gauge)
The number of active pubsub channels.
redis.pubsub.clients
(gauge)
Number of clients in pubsub mode (SUBSCRIBE, PSUBSCRIBE, SSUBSCRIBE)
redis.pubsub.patterns
(gauge)
The number of active pubsub patterns.
redis.pubsub.shard_channels
(gauge)
Global number of pub/sub shard channels with client subscriptions
redis.rdb.bgsave
(gauge)
One if a bgsave is in progress and zero otherwise.
redis.rdb.changes_since_last
(gauge)
The number of changes since the last background save.
redis.rdb.current_bgsave_time_sec
(gauge)
Duration of the on-going RDB save operation
Shown as second
redis.rdb.last_bgsave_time
(gauge)
Duration of the last bg_save operation.
Shown as second
redis.rdb.last_cow_size
(gauge)
The size in bytes of copy-on-write memory during the last RDB save operation
Shown as byte
redis.rdb.last_load.keys_expired
(gauge)
Number of volatile keys deleted during the last RDB loading [v7+].
redis.rdb.last_load.keys_loaded
(gauge)
Number of keys loaded during the last RDB loading [v7+].
redis.rdb.last_save_time
(gauge)
Epoch-based timestamp of last successful RDB save
redis.rdb.saves
(gauge)
Number of RDB snapshots performed since startup
redis.replication.backlog_active
(gauge)
Flag indicating replication backlog is active
redis.replication.backlog_first_byte_offset
(gauge)
The master offset of the replication
redis.replication.backlog_histlen
(gauge)
The amount of data in the backlog sync buffer.
Shown as byte
redis.replication.backlog_size
(gauge)
Total size in bytes of the replication backlog buffer
Shown as byte
redis.replication.delay
(gauge)
The replication delay in offsets.
Shown as offset
redis.replication.input_total_bytes
(gauge)
The total number of bytes read from the network for replication purposes
Shown as byte
redis.replication.instantaneous_input_kbps
(gauge)
The network’s read rate per second in KB/sec for replication purposes
Shown as kilobyte
redis.replication.instantaneous_output_kbps
(gauge)
The network’s write rate per second in KB/sec for replication purposes
Shown as kilobyte
redis.replication.last_io_seconds_ago
(gauge)
Amount of time since the last interaction with master.
Shown as second
redis.replication.master_link_down_since_seconds
(gauge)
Amount of time that the master link has been down.
Shown as second
redis.replication.master_port
(gauge)
Master listening TCP port
redis.replication.master_repl_offset
(gauge)
The replication offset reported by the master.
Shown as offset
redis.replication.min_slaves_good_slaves
(gauge)
Number of replicas currently considered good
redis.replication.output_total_bytes
(gauge)
The total number of bytes written to the network for replication purposes
Shown as byte
redis.replication.replica_announced
(gauge)
Flag indicating if the replica is announced by Sentinel.
redis.replication.second_repl_offset
(gauge)
The offset up to which replication IDs are accepted
redis.replication.slave.expires_tracked_keys
(gauge)
The number of keys tracked for expiry purposes
redis.replication.slave.priority
(gauge)
The priority of the instance as a candidate for failover
redis.replication.slave.read_only
(gauge)
Flag indicating if the replica is read-only
redis.replication.slave.read_repl_offset
(gauge)
The read replication offset of the replica instance.
redis.replication.slave_repl_offset
(gauge)
The replication offset reported by the slave.
Shown as offset
redis.replication.sync
(gauge)
One if a sync is in progress and zero otherwise.
redis.replication.sync.full
(gauge)
The number of full resyncs with replicas
redis.replication.sync.last_io_seconds_ago
(gauge)
Number of seconds since last transfer I/O
Shown as second
redis.replication.sync.partial_err
(gauge)
The number of denied partial resync requests
redis.replication.sync.partial_ok
(gauge)
The number of accepted partial resync requests
redis.replication.sync.read_bytes
(gauge)
Number of bytes already transferred
Shown as byte
redis.replication.sync.total_bytes
(gauge)
Total number of bytes that need to be transferred. This may be 0 when the size is unknown (for example, when the repl-diskless-sync configuration directive is used)
Shown as byte
redis.replication.sync_left_bytes
(gauge)
Amount of data left before syncing is complete.
Shown as byte
redis.reply_buffer.expands
(gauge)
Total number of output buffer expands
redis.reply_buffer.shrinks
(gauge)
Total number of output buffer shrinks
redis.scripts.cached
(gauge)
The number of EVAL scripts cached by the server [v7+].
redis.scripts.evicted
(gauge)
Number of evicted EVAL scripts due to LRU policy [v7.4+].
redis.search.bytes_collected
(gauge)
The total amount of memory freed by the garbage collectors from indexes in the shard memory in bytes
Shown as byte
redis.search.cursors.internal_active
(gauge)
The total number of coordinator cursors in the shard, either holding pending results or actively executing FT.CURSOR READ
redis.search.cursors.internal_idle
(gauge)
The total number of coordinator cursors that are currently holding pending results in the shard
redis.search.cursors.user_active
(gauge)
The total number of user cursors in the shard, either holding pending results or actively executing FT.CURSOR READ
redis.search.cursors.user_idle
(gauge)
The total number of cursors that were explicitly requested by users, that are currently holding pending results in the shard
redis.search.docs_not_collected
(gauge)
The number of documents marked as deleted whose memory has not yet been freed by the garbage collector
redis.search.errors.indexing_failures
(gauge)
The total number of indexing failures recorded across all indexes in the shard
redis.search.errors.max_failures
(gauge)
The number of indexing failures in the index with the highest count of failures
redis.search.fields.geo.geo
(gauge)
The total number of GEO fields across all indexes in the shard
redis.search.fields.geo.noindex
(gauge)
The total number of NOINDEX GEO fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.geo.sortable
(gauge)
The total number of SORTABLE GEO fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.geoshape.geoshape
(gauge)
The total number of GEOSHAPE fields across all indexes in the shard
redis.search.fields.geoshape.noindex
(gauge)
The total number of NOINDEX GEOSHAPE fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.geoshape.sortable
(gauge)
The total number of SORTABLE GEOSHAPE fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.numeric.noindex
(gauge)
The total number of NOINDEX NUMERIC fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.numeric.numeric
(gauge)
The total number of NUMERIC fields across all indexes in the shard
redis.search.fields.numeric.sortable
(gauge)
The total number of SORTABLE NUMERIC fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.tag.case_sensitive
(gauge)
The total number of CASESENSITIVE TAG fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.tag.noindex
(gauge)
The total number of NOINDEX TAG fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.tag.sortable
(gauge)
The total number of SORTABLE TAG fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.tag.tag
(gauge)
The total number of TAG fields across all indexes in the shard
redis.search.fields.text.noindex
(gauge)
The total number of NOINDEX TEXT fields across all indexes in the shard, which are used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.text.sortable
(gauge)
The total number of SORTABLE TEXT fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.text.text
(gauge)
The total number of TEXT fields across all indexes in the shard
redis.search.fields.vector.flat
(gauge)
The total number of FLAT VECTOR fields across all indexes in the shard
redis.search.fields.vector.hnsw
(gauge)
The total number of HNSW VECTOR fields across all indexes in the shard
redis.search.fields.vector.vector
(gauge)
The total number of VECTOR fields across all indexes in the shard
redis.search.gc.bytes_collected
(gauge)
The total amount of memory freed by the garbage collectors from indexes in the shard’s memory in bytes
Shown as byte
redis.search.gc.docs_not_collected
(gauge)
The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector
redis.search.gc.marked_deleted_vectors
(gauge)
The number of vectors marked as deleted in the vector indexes that have not yet been cleaned
redis.search.gc.total_cycles
(gauge)
The total number of garbage collection cycles executed
redis.search.gc.total_ms_run
(gauge)
The total duration of all garbage collection cycles in the shard, measured in milliseconds
Shown as millisecond
redis.search.global_idle
(gauge)
The total number of user and internal cursors currently holding pending results in the shard. Deprecated in 8.0 (split into redis.search.cursors.internal_idle and redis.search.cursors.user_idle) but still available in older versions
redis.search.global_total
(gauge)
The total number of user and internal cursors in the shard, either holding pending results or actively executing FT.CURSOR READ. Deprecated in 8.0 (split into redis.search.cursors.internal_active and redis.search.cursors.user_active), but still available in older versions
redis.search.indexes.active
(gauge)
The total number of indexes running a background indexing and/or background query processing operation. Background indexing refers to vector ingestion process, or in-progress background indexer
redis.search.indexes.active_indexing
(gauge)
The total count of indexes currently undergoing a background indexing process. Background indexing refers to a vector ingestion process, or an in-progress background indexer. This metric is limited by the number of WORKER threads allocated for writing operations plus the number of indexes
redis.search.indexes.running_queries
(gauge)
The total count of indexes currently running a background query process
redis.search.indexes.total
(gauge)
The total number of indexes in the shard
redis.search.indexing.total_time
(gauge)
The total time spent on indexing operations, excluding the background indexing of vectors in the HNSW graph
redis.search.marked_deleted_vectors
(gauge)
The number of vectors marked as deleted in the vector indexes that have not yet been cleaned
redis.search.memory.largest_index
(gauge)
The estimated memory usage of the index with the largest memory usage in the shard in bytes
Shown as byte
redis.search.memory.smallest_index
(gauge)
The estimated memory usage of the index with the smallest memory usage in the shard in bytes
Shown as byte
redis.search.memory.used_indexes
(gauge)
The estimated total memory allocated by all indexes in the shard in bytes (including vector indexes memory accounted in search_used_memory_vector_index)
Shown as byte
redis.search.memory.used_vector_index
(gauge)
The total memory usage of all vector indexes in the shard
Shown as byte
redis.search.queries.active
(gauge)
The total number of background queries currently being executed in the shard, excluding FT.CURSOR READ
redis.search.queries.commands
(gauge)
The total number of successful query command executions (including FT.SEARCH, FT.AGGREGATE, and FT.CURSOR READ)
redis.search.queries.execution_time_ms
(gauge)
The cumulative execution time of all query commands, including FT.SEARCH, FT.AGGREGATE, and FT.CURSOR READ, measured in ms
Shown as millisecond
redis.search.queries.processed
(gauge)
The total number of successful query executions (When using cursors, not counting reading from existing cursors) in the shard
redis.search.total_cycles
(gauge)
The total number of garbage collection cycles executed
redis.search.total_ms_run
(gauge)
The total duration of all garbage collection cycles in the shard, measured in milliseconds
Shown as millisecond
redis.search.write_threads.active
(gauge)
The total count of background write (indexing) processes currently running in the shard. Background indexing refers to a vector ingestion process, or an in-progress background indexer. This metric is limited by the number of threads allocated for writing operations
redis.sentinel.masters
(gauge)
Number of Redis masters monitored by this Sentinel instance
redis.sentinel.running_scripts
(gauge)
The number of scripts this Sentinel is currently executing
redis.sentinel.scripts_queue_length
(gauge)
The length of the queue of user scripts that are pending execution
redis.sentinel.simulate_failure_flags
(gauge)
Flags for the SENTINEL SIMULATE-FAILURE command
redis.sentinel.tilt
(gauge)
A value of 1 means this sentinel is in TILT mode
redis.sentinel.tilt_since_seconds
(gauge)
Duration in seconds of current TILT, or -1 if not TILTed [v7+].
Shown as second
redis.sentinel.total_tilt
(gauge)
The number of times this sentinel has been in TILT mode since running.
redis.server.io_threads_active
(gauge)
Flag indicating if I/O threads are active [v6+].
redis.slowlog.micros.95percentile
(gauge)
The 95th percentile of the duration of queries reported in the slow log.
Shown as microsecond
redis.slowlog.micros.avg
(gauge)
The average duration of queries reported in the slow log.
Shown as microsecond
redis.slowlog.micros.count
(rate)
The rate of queries reported in the slow log.
Shown as query
redis.slowlog.micros.max
(gauge)
The maximum duration of queries reported in the slow log.
Shown as microsecond
redis.slowlog.micros.median
(gauge)
The median duration of queries reported in the slow log.
Shown as microsecond
redis.stats.io_threaded_reads_processed
(gauge)
Number of read events processed by the main and I/O threads [v6+].
redis.stats.io_threaded_writes_processed
(gauge)
Number of write events processed by the main and I/O threads [v6+].
redis.stats.keyspace_hits
(gauge)
The rate of successful lookups in the main db.
Shown as key
redis.stats.keyspace_misses
(gauge)
The rate of missed lookups in the main db.
Shown as key
redis.tracking.clients
(gauge)
Number of clients being tracked
redis.tracking.total_items
(gauge)
Number of items, that is the sum of clients number for each key, that are being tracked
redis.tracking.total_keys
(gauge)
Number of keys being tracked by the server
redis.tracking.total_prefixes
(gauge)
Number of tracked prefixes in server’s prefix table

Events

The Redis check does not include any events.

Service Checks

redis.can_connect

Returns CRITICAL if the Agent check is unable to connect to the monitored redis instance. Returns OK otherwise.

Statuses: ok, critical

redis.replication.master_link_status

Returns CRITICAL if this Redis instance is unable to connect to its master instance. Returns OK otherwise.

Statuses: ok, critical

Troubleshooting

Agent cannot connect

    redisdb
    -------
      - instance #0 [ERROR]: 'Error 111 connecting to localhost:6379. Connection refused.'
      - Collected 0 metrics, 0 events & 1 service check

Check that the connection info in redisdb.yaml is correct.

Agent cannot authenticate

    redisdb
    -------
      - instance #0 [ERROR]: 'NOAUTH Authentication required.'
      - Collected 0 metrics, 0 events & 1 service check

Configure a password in redisdb.yaml.

Further Reading

Additional helpful documentation, links, and articles: