Redis is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indexes.

Prerequisites

  1. Edit the file /etc/redis/redis.conf with the following:
supervised systemd
bind 0.0.0.0
appendonly yes
  1. For Virtual Machines, install the Linux Agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

redis:
- name: redis
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2

Configuring the application

Virtual machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: redis
  instance-checks:
    service-check:
      - redis-server
    process-check:
      - redis-server
    port-check:
      - 6379
  misc:
    unix-socket-path: "localhost:9090" # If nothing is specified then <ip>:<port> is considered. Ignore this field unless its necessary.
    socket-timeout: "10" # if empty then default value of 20 seconds is considered.

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: redis
  container-checks:
    image-check:
      - redis
    port-check:
      - 6379
  misc:
    socket-timeout: "10" # if empty then default value of 20 seconds is considered.

Kubernetes environment

Configure the application in config.yaml

- name: redis
  container-checks:
    image-check:
      - redis
    port-check:
      - 6379
  misc:
    socket-timeout: "10" # if empty then default value of 20 seconds is considered.

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnit
redis_uptime

Redis Uptime
Redis Uptimeseconds
redis_active_defrag_running

Flag indicating if active defragmentation is active
Active Defragmentation Flag
redis_active_defrag_hits

Number of value reallocations performed by active the defragmentation process
Defrag Process Value Reallocations Performed
redis_active_defrag_misses

Number of aborted value reallocations started by the active defragmentation process
Defrag Process Aborted Value Reallocations Started
redis_active_defrag_key_hits

Number of keys that were actively defragmented
Actively Defrag Keys
redis_active_defrag_key_misses

Number of keys that were skipped by the active defragmentation process
Skipped Active Defrag Keys
redis_aof_last_rewrite_time_sec

Duration of the last AOF rewrite operation in seconds
AOF Last Rewrite Op Timeseconds
redis_aof_current_size

AOF current file size
AOF Current File Sizemegabytes
redis_aof_buffer_length

Size of the AOF buffer
AOF Buffer Sizemegabytes
redis_loading_total

Total file size
AOF Total Bytes To Loadmegabytes
redis_loading_loaded

Number of bytes already loaded
AOF Total Bytes Loadedmegabytes
redis_loading_loaded_perc

Same value expressed as a percentage
AOF Loaded Percentage%
redis_loading_eta_seconds

ETA in seconds for the load to be complete
AOF Loading Time Leftseconds
redis_net_clients

Number of client connections (excluding connections from replicas)
Client Connections
redis_net_slaves

Number of connected replicas
Connected Replicas
redis_net_rejected

Rate of number of connections rejected because of maximum client limit
Connections Rejected Due to MaxClient Limit
redis_net_commands

Rate of number of commands processed by the server
Commands Processed Rate
redis_net_commands_instantaneous_ops_per_sec

Number of commands processed per second
Commands Processed Per Second
redis_net_accepted

Rate of number of connections accepted by the server
Connections Accepted Rate
redis_net_maxclients

Maximum number of Client
Max Clients
redis_clients_blocked

Number of clients pending on a blocking call
Clients Blocked
redis_clients_biggest_input_buf

Biggest input buffer among current client connections
Clients Biggest InputBuf
redis_clients_longest_output_list

Longest output list among current client connections
Clients Longest OutputList
redis_keys_evicted

Number of evicted keys due to maximum memory limit
Evicted Keys
redis_keys_expired

Total number of key expiration events
Expired Keys
redis_keys_total

Provides the total number of keys from all the DBs.
Total Keys
redis_perf_latest_fork_usec

Duration of the latest fork operation in microseconds
Latest Fork Op Time
redis_pubsub_channels

Global number of pub/sub channels with client subscriptions
Pubsub Channels
redis_pubsub_patterns

Global number of pub/sub pattern with client subscriptions
Pubsub Patterns
redis_rdb_changes_since_last

Refers to the number of operations that caused updates in the dataset when either SAVE or BGSAVE was used the last time.
RDB Changes
redis_rdb_last_bgsave_time

Duration of the last RDB save operation in seconds
RDB Last Save Op Time
redis_mem_fragmentation_ratio

Ratio between used_memory_rss and used_memory
Memory Fragmentation Ratio
redis_mem_used

Total number of Megabytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc)
Memory Allocatedmegabytes
redis_mem_lua

Number of Megabytes used by the Lua engine
Memory Used LUAmegabytes
redis_mem_peak

Peak memory consumed by Redis (in Megabytes)
Peak Memory Consumedmegabytes
redis_mem_rss

Number of Megabytes that Redis allocated as seen by the operating system (also known as resident set size).
Memory Allocated Seen By OSmegabytes
redis_mem_startup

Initial amount of memory consumed by Redis at startup in Megabytes
Redis Startup Memorymegabytes
redis_mem_overhead

The sum in Megabytes of all overheads that the server allocated for managing its internal data structures
Internal DS Memory Overheadsmegabytes
redis_mem_maxmemory

The value of the maxmemory configuration directive
Max Memorymegabytes
redis_replication_last_io_seconds_ago

Number of seconds since the last interaction with master
Seconds Since Last Interactionseconds
redis_replication_sync_left_bytes

Number of bytes left before syncing is complete
Syncing Bytes Leftbytes
redis_replication_backlog_histlen

Size in bytes of the data in the replication backlog buffer
Replication Backlog Bufferbytes
redis_replication_master_repl_offset

The server's current replication offset
Server Replication Offset
redis_replication_slave_repl_offset

The replication offset of the replica instance
Replica Replication Offset
redis_replication_link_status

Status of the link (up/down)
Replication Link Status
redis_cpu_sys

System CPU consumed by the Redis server
CPU Systemseconds
redis_cpu_sys_children

System CPU consumed by the background processes
CPU System Childrenseconds
redis_cpu_user

User CPU consumed by the Redis server
CPU Userseconds
redis_cpu_user_children

User CPU consumed by the background processes
CPU User Childrenseconds
redis_stats_keyspace_hits

Rate of number of successful lookup of keys in the main dictionary
Keyspace Hits Rate
redis_stats_keyspace_misses

Rate of number of failed lookup of keys in the main dictionary
Keyspace Misses Rate