Redis

Redis is an open source, in-memory data structure store, used as a database, cache and message broker. Our integration pulls in statistics from the Redis INFO command for comprehensive and complete Redis monitoring.

Setup

The redis plugin is included with the AppOptics host agent by default. Please follow the directions below to enable it for a host agent instance.

Prerequisites

You’ll need to have a Redis server accessible. Take note of the host address, port, and password (if set). This will be needed later in the configuration step.

Configuration

The host agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your Redis installation. To enable the plugin:

  1. Make a copy of the Redis example configuration file /opt/appoptics/etc/plugins.d/redis.yaml.example, renaming it to /opt/appoptics/etc/plugins.d/redis.yaml:
$ sudo cp /opt/appoptics/etc/plugins.d/redis.yaml.example /opt/appoptics/etc/plugins.d/redis.yaml
  1. Edit the configuration file with settings specific to your Redis install:
$ sudo nano /opt/appoptics/etc/plugins.d/redis.yaml

In this configuration you’ll notice that it is already configured for localhost. If your Redis server is located on another server you will need to edit the configuration to reflect the correct server address and password (if applicable):

collector:
  redis:
    all:
      ## specify servers via a url matching:
      ##  [protocol://][:password]@address[:port]
      ##  e.g.
      ##    tcp://localhost:6379
      ##    tcp://:password@192.168.99.100
      ##
      ## If no servers are specified, then localhost is used as the host.
      ## If no port is specified, 6379 is used
      servers: |-
        tcp://localhost:6379
        tcp://otherhost:6379

load:
  plugin: snap-plugin-collector-bridge-redis
  task: task-bridge-redis.yaml

Save your changes and return to the command prompt.

  1. Restart the agent after any configuration changes have been made:
$ sudo service appoptics-snapteld restart
  1. Enable the Redis plugin

On the Integrations Page you will see Redis available if the previous steps were successful. It may take a couple minutes before the Redis plugin is identified.

Select the Redis plugin to open the configuration menu in the UI, and enable the plugin.

Metrics and Tags

The table below outlines the default set of metrics collected by the redis plugin.

Namespace Description
redis.active_defrag_hits Total hits on the active memory defragmentation
redis.active_defrag_key_hits Number of successful lookup of keys in the active memory defragmentation
redis.active_defrag_key_misses Number of unsuccessful lookup of keys in the active memory defragmentation
redis.active_defrag_misses Total misses on the active memory defragmentation
redis.active_defrag_running Total running processes on the active memory defragmentation
redis.aof_current_rewrite_time_sec Rewrite time for data persistence via append only files
redis.aof_enabled Enable data persistence via append only files
redis.aof_last_cow_size Copy on write size for data persistence via append only files
redis.aof_last_rewrite_time_sec Total time of last reqrite for data persistence via append only files
redis.aof_rewrite_in_progress Flag indicating a rewrite for data persistence via append only files
redis.aof_rewrite_scheduled Flag indicating if a rewrite is scheduled for data persistence via append only files
redis.blocked_clients Total blocked clients
redis.client_biggest_input_buf Largest input buffer for client connection
redis.client_longest_output_list Longest output list for client connection
redis.clients Total clients connected
redis.cluster_enabled Total clusters enabled
redis.connected_slaves Total connected replication slaves
redis.evicted_keys Number of evicted keys due to maxmemory limit
redis.expired_keys Total number of key expiration events
redis.instantaneous_input_kbps Command proccess input (in bytes)
redis.instantaneous_ops_per_sec Number of commands processed per second
redis.instantaneous_output_kbps Command process output (in bytes)
redis.keyspace_hitrate Rate of successful lookup of keys in the main dictionary
redis.keyspace_hits Number of successful lookup of keys in the main dictionary
redis.keyspace_misses Number of failed lookup of keys in the main dictionary
redis.latest_fork_usec Duration of the latest fork operation in microseconds
redis.lazyfree_pending_objects Total pending objects in a lazy free list
redis.loading Flag indicating if the load of a dump file is on-going
redis.lru_clock Clock incrementing every minute for LRU management
redis.master_repl_offset The replication offset of master (in ms)
redis.master_replid2 The master replication id
redis.maxmemory The set maximum memory
redis.mem_fragmentation_ratio Ratio between used_memory_rss and used_memory
redis.migrate_cached_sockets Current amount of cached sockets
redis.pubsub_channels Global number of pub/sub channels with client subscriptions
redis.pubsub_patterns Global number of pub/sub pattern with client subscriptions
redis.rdb_bgsave_in_progress Flag indicating a RDB save is on-going
redis.rdb_changes_since_last_save Number of changes since the last dump
redis.rdb_current_bgsave_time_sec Duration of the on-going RDB save operation if any
redis.rdb_last_bgsave_time_sec Duration of the last RDB save operation in seconds
redis.rdb_last_cow_size Last RDB copy-on-write size
redis.rdb_last_save_time Duration of the last RDB save operation in seconds
redis.rdb_last_save_time_elapsed Duration of the elapsed time since last RDB save operation in seconds
redis.redis_keyspace Number of successful lookup of keys in the main dictionary
redis.rejected_connections Number of connections rejected because of maxclients limit
redis.repl_backlog_active memory used to keep track of recent changes. This buffer is used by slaves to catch up fast after a reconnect instead of transferring the whole database.
redis.repl_backlog_first_byte_offset The replication offset of the buffer (in ms)
redis.repl_backlog_histlen The amount of actual data that is in the PSYNC buffer.
redis.repl_backlog_size Total memory allocated to keep track of recent changes. This buffer is used by slaves to catch up fast after a reconnect instead of transferring the whole database.
redis.second_repl_offset The replication offset of slave (in ms)
redis.slave_expires_tracked_keys Total number of key expiration events
redis.sync_full Flag indicating if sync is full
redis.sync_partial_err Flag indicating if there is an error with the partial sync operation
redis.sync_partial_ok Flag indicating if partial sync operation is successfull
redis.total_commands_processed Total number of commands processed by the server
redis.total_connections_received Total number of connections accepted by the server
redis.total_net_input_bytes Total input (in bytes)
redis.total_net_output_bytes Total output (in bytes)
redis.total_system_memory Total system memory
redis.uptime Total uptime
redis.used_cpu_sys System CPU consumed by the Redis server
redis.used_cpu_sys_children System CPU consumed by the background processes
redis.used_cpu_user User CPU consumed by the Redis server
redis.used_cpu_user_children User CPU consumed by the background processes
redis.used_memory Total number of bytes allocated by Redis using its allocator
redis.used_memory_dataset Total used memory for dataset
redis.used_memory_lua Total used memory for Lua
redis.used_memory_overhead Total used overhead memory
redis.used_memory_peak Peak memory used
redis.used_memory_rss Total used RSS memory
redis.used_memory_startup Memory used during master startup

Tags

The table below outlines the default set of tags provided for each metric.

Tags Description
replication_role Name of the database
hostname Name of the host. Instead of using this tag we recommend using the @host alias.
server Name of the server
port Port which the server is running on