Stackstate-Redis Integration

Overview

Track and graph your Redis activity and performance metrics with slice-and-dice at all levels from individual column families to entire clusters.

Configuration

  1. Configure the Agent to connect to the Redis server. Edit conf.d/redisdb.yaml:

    init_config:
    
    instances:
      - host: localhost
        port: 6379
        tags:
          - optional_tag1
          - optional_tag2
        keys:
          - key1
    
  2. Restart the Agent

Configuration Options

  • unix_socket_path - (Optional) - Can be used instead of host and port.
  • db, password, and socket_timeout - (Optional) - Additional connection options.
  • warn_on_missing_keys - (Optional) - Display a warning in the info page if the keys we’re tracking are missing.
  • slowlog-max-len - (Optional) - Maximum number of entries to fetch from the slow query log. By default, the check will read this value from the redis config. If it’s above 128, it will default to 128 due to potential increased latency to retrieve more than 128 slowlog entries every 15 seconds. If you need to get more entries from the slow query logs set the value here. Warning: It may impact the performance of your redis instance
  • command_stats - (Optional) - Collect INFO COMMANDSTATS output as metrics.

For more details about configuring this integration refer to the following file(s) on GitHub:

Validation

  1. Execute the info command and verify that the integration check has passed. The output of the command should contain a section similar to the following:

    Checks
    ======
    
      [...]
    
      redisdb
      -------
        - instance #0 [OK]
        - Collected 8 metrics & 0 events
    

Metrics

redis.aof.buffer_length
(gauge)
Size of the AOF buffer.
shown as byte
redis.aof.last_rewrite_time
(gauge)
Duration of the last AOF rewrite.
shown as second
redis.aof.rewrite
(gauge)
Flag indicating a AOF rewrite operation is on-going.
redis.aof.size
(gauge)
AOF current file size (aof_current_size).
shown as byte
redis.clients.biggest_input_buf
(gauge)
The biggest input buffer among current client connections.
redis.clients.blocked
(gauge)
The number of connections waiting on a blocking call.
shown as connection
redis.clients.longest_output_list
(gauge)
The longest output list among current client connections.
redis.cpu.sys
(gauge)
System CPU consumed by the Redis server.
shown as second
redis.cpu.sys_children
(gauge)
System CPU consumed by the background processes.
shown as second
redis.cpu.user
(gauge)
User CPU consumed by the Redis server.
shown as second
redis.cpu.user_children
(gauge)
User CPU consumed by the background processes.
shown as second
redis.expires
(gauge)
The number of keys that have expired.
shown as key
redis.expires.percent
(gauge)
Percentage of total keys that have been expired.
shown as percent
redis.info.latency_ms
(gauge)
The latency of the redis info command.
shown as millisecond
redis.key.length
(gauge)
The number of elements in the given key.
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.mem.fragmentation_ratio
(gauge)
Ratio between used_memory_rss and used_memory.
shown as fraction
redis.mem.lua
(gauge)
Amount of memory used by the Lua engine.
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.used
(gauge)
Amount of memory allocated by Redis.
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.rejected
(gauge)
The number of rejected connections.
shown as connection
redis.net.slaves
(gauge)
The number of connected slaves.
shown as connection
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.pubsub.channels
(gauge)
The number of active pubsub channels.
redis.pubsub.patterns
(gauge)
The number of active pubsub patterns.
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.last_bgsave_time
(gauge)
Duration of the last bg_save operation.
shown as second
redis.replication.backlog_histlen
(gauge)
The amount of data in the backlog sync buffer.
shown as byte
redis.replication.delay
(gauge)
The replication delay in offsets.
shown as offset
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_repl_offset
(gauge)
The replication offset reported by the master.
shown as offset
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_left_bytes
(gauge)
Amount of data left before syncing is complete.
shown as byte
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/second
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.keyspace_hits
(gauge)
The total number of successful lookups in the db.
shown as key
redis.stats.keyspace_misses
(gauge)
The total number of missed lookups in the db.
shown as key