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
- Edit the file
/etc/redis/redis.conf
with the following:
supervised systemd
bind 0.0.0.0
appendonly yes
- 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 needed.
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.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
redis_uptime Redis Uptime | Redis Uptime | seconds |
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 Time | seconds |
redis_aof_current_size AOF current file size | AOF Current File Size | megabytes |
redis_aof_buffer_length Size of the AOF buffer | AOF Buffer Size | megabytes |
redis_loading_total Total file size | AOF Total Bytes To Load | megabytes |
redis_loading_loaded Number of bytes already loaded | AOF Total Bytes Loaded | megabytes |
redis_loading_loaded_perc Same value expressed as a percentage | AOF Loaded Percentage | percent |
redis_loading_eta_seconds ETA in seconds for the load to be complete | AOF Loading Time Left | seconds |
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 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 (standard libc, jemalloc, or an alternative allocator such as tcmalloc) | Memory Allocated | megabytes |
redis_mem_lua Number of Megabytes used by the Lua engine | Memory Used LUA | megabytes |
redis_mem_peak Peak memory consumed by Redis (in Megabytes) | Peak Memory Consumed | megabytes |
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 OS | megabytes |
redis_mem_startup Initial amount of memory consumed by Redis at startup in Megabytes | Redis Startup Memory | megabytes |
redis_mem_overhead The sum in Megabytes of all overheads that the server allocated for managing its internal data structures | Internal DS Memory Overheads | megabytes |
redis_mem_maxmemory The value of the maxmemory configuration directive | Max Memory | megabytes |
redis_replication_last_io_seconds_ago Number of seconds since the last interaction with master | Seconds Since Last Interaction | seconds |
redis_replication_sync_left_bytes Number of bytes left before syncing is complete | Syncing Bytes Left | bytes |
redis_replication_backlog_histlen Size in bytes of the data in the replication backlog buffer | Replication Backlog Buffer | bytes |
redis_replication_master_repl_offset The server 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 System | seconds |
redis_cpu_sys_children System CPU consumed by the background processes | CPU System Children | seconds |
redis_cpu_user User CPU consumed by the Redis server | CPU User | seconds |
redis_cpu_user_children User CPU consumed by the background processes | CPU User Children | seconds |
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 |