Documentation forAppOptics

Redis

Overview

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 monitoring is accomplished by bridge plugin which is included with the SolarWinds Snap Agent by default. Follow the directions below to enable it for an agent instance. The bridge plugin utilize Telegraf Redis plugin.

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 agent provides an example task file to help you get started quickly, but requires you to provide the correct settings for your Redis installation. To enable the task:

  1. Make a copy of the Redis example task file task-bridge-redis.yaml.example, renaming it to task-bridge-redis.yaml:

    On Windows, using Explorer or PowerShell:

    copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-redis.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-redis.yaml"

    On Linux using command line:

    sudo cp -p /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-redis.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-redis.yaml
  2. Edit the task file with settings specific to your Redis install:

    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):

    If you wish to also collect logs for this service, uncomment the last section in the example task file. For more information on collecting logs, see the logs collector docs.

    ---
    version: 2
    
    schedule:
      type: cron
      interval: "0 * * * * *"
    
    plugins:
      - plugin_name: bridge
    
        config:
          redis:
            ## specify servers via a url matching:
            ##  [protocol://][:password]@address:port
            ##  e.g.
            ##    tcp://localhost:6379
            ##    tcp://:password@192.168.99.100:6379
            ##
            ## If no servers are specified, then localhost on port 6379 is used as the host.
            servers:
              - tcp://localhost:6379
    
            ## Optional TLS Config
            # tls_ca: /path/to/cafile
            # tls_cert: /path/to/certfile
            # tls_key: /path/to/keyfile
            
            ## Use TLS but skip chain & host verification
            # insecure_skip_verify: true
    
        publish:
          - plugin_name: publisher-appoptics
    
    ## If you want to gather logs for this integration, uncomment the following section.
    #  - plugin_name: log-files
    #    config:
    #      file_paths:
    #        - /var/log/redis*.log
    
    #    publish:
    #      - plugin_name: loggly-http-bulk
  3. Restart the agent after any configuration changes have been made:

    On Windows command line:

    net stop swisnapd
    net start swisnapd

    On Linux command line:

    sudo service swisnapd restart
  4. Enable the Redis integration in AppOptics

    On the Integrations Page you will see Redis integration available if the previous steps were successful. It may take a couple minutes before the Redis integration is identified. Select the Redis integration to open the configuration menu in the UI, and enable it. If you do not see it, see Troubleshooting Linux.

Testing Integration

To check if and what metrics can be collected with given configuration, run bridge plugin in debug mode:

On Windows command line:

"C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-bridge.exe" --debug-mode --plugin-config "{\"redis\": {\"servers\": [\"tcp://localhost:6379\"]}}"

On Linux command line:

/opt/SolarWinds/Snap/bin/snap-plugin-collector-bridge --debug-mode --plugin-config "{\"redis\": {\"servers\": [\"tcp://localhost:6379\"]}}"

Metrics and Tags

Metrics

The table below outlines the default set of metrics collected by the Redis integration.

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

Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.