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 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 Metric | Metric Display Name | Unit | Description |
---|---|---|---|
redis_uptime | Redis Uptime | seconds | Redis Uptime |
redis_active_defrag_running | Active Defragmentation Flag | Flag indicating if active defragmentation is active | |
redis_active_defrag_hits | Defrag Process Value Reallocations Performed | Number of value reallocations performed by active the defragmentation process | |
redis_active_defrag_misses | Defrag Process Aborted Value Reallocations Started | Number of aborted value reallocations started by the active defragmentation process | |
redis_active_defrag_key_hits | Actively Defrag Keys | Number of keys that were actively defragmented | |
redis_active_defrag_key_misses | Skipped Active Defrag Keys | Number of keys that were skipped by the active defragmentation process | |
redis_aof_last_rewrite_time_sec | AOF Last Rewrite Op Time | seconds | Duration of the last AOF rewrite operation in seconds |
redis_aof_current_size | AOF Current File Size | megabytes | AOF current file size |
redis_aof_buffer_length | AOF Buffer Size | megabytes | Size of the AOF buffer |
redis_loading_total | AOF Total Bytes To Load | megabytes | Total file size |
redis_loading_loaded | AOF Total Bytes Loaded | megabytes | Number of bytes already loaded |
redis_loading_loaded_perc | AOF Loaded Percentage | % | Same value expressed as a percentage |
redis_loading_eta_seconds | AOF Loading Time Left | seconds | ETA in seconds for the load to be complete |
redis_net_clients | Client Connections | Number of client connections (excluding connections from replicas) | |
redis_net_slaves | Connected Replicas | Number of connected replicas | |
redis_net_rejected | Connections Rejected Due to MaxClient Limit | Rate of number of connections rejected because of maximum client limit | |
redis_net_commands | Commands Processed Rate | Rate of number of commands processed by the server | |
redis_net_commands_instantaneous_ops_per_sec | Commands Processed Per Second | Number of commands processed per second | |
redis_net_accepted | Connections Accepted Rate | Rate of number of connections accepted by the server | |
redis_net_maxclients | Max Clients | Maximum number of Client | |
redis_clients_blocked | Clients Blocked | Number of clients pending on a blocking call | |
redis_clients_biggest_input_buf | Clients Biggest InputBuf | Biggest input buffer among current client connections | |
redis_clients_longest_output_list | Clients Longest OutputList | Longest output list among current client connections | |
redis_keys_evicted | Evicted Keys | Number of evicted keys due to maximum memory limit | |
redis_keys_expired | Expired Keys | Total number of key expiration events | |
redis_keys_total | Total Keys | Provides the total number of keys from all the DBs. | |
redis_perf_latest_fork_usec | Latest Fork Op Time | Duration of the latest fork operation in microseconds | |
redis_pubsub_channels | Pubsub Channels | Global number of pub/sub channels with client subscriptions | |
redis_pubsub_patterns | Pubsub Patterns | Global number of pub/sub pattern with client subscriptions | |
redis_rdb_changes_since_last | RDB Changes | Refers to the number of operations that caused updates in the dataset when either SAVE or BGSAVE was used the last time. | |
redis_rdb_last_bgsave_time | RDB Last Save Op Time | Duration of the last RDB save operation in seconds | |
redis_mem_fragmentation_ratio | Memory Fragmentation Ratio | Ratio between used_memory_rss and used_memory | |
redis_mem_used | Memory Allocated | megabytes | Total number of Megabytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc) |
redis_mem_lua | Memory Used LUA | megabytes | Number of Megabytes used by the Lua engine |
redis_mem_peak | Peak Memory Consumed | megabytes | Peak memory consumed by Redis (in Megabytes) |
redis_mem_rss | Memory Allocated Seen By OS | megabytes | Number of Megabytes that Redis allocated as seen by the operating system (also known as resident set size). |
redis_mem_startup | Redis Startup Memory | megabytes | Initial amount of memory consumed by Redis at startup in Megabytes |
redis_mem_overhead | Internal DS Memory Overheads | megabytes | The sum in Megabytes of all overheads that the server allocated for managing its internal data structures |
redis_mem_maxmemory | Max Memory | megabytes | The value of the maxmemory configuration directive |
redis_replication_last_io_seconds_ago | Seconds Since Last Interaction | seconds | Number of seconds since the last interaction with master |
redis_replication_sync_left_bytes | Syncing Bytes Left | bytes | Number of bytes left before syncing is complete |
redis_replication_backlog_histlen | Replication Backlog Buffer | bytes | Size in bytes of the data in the replication backlog buffer |
redis_replication_master_repl_offset | Server Replication Offset | The server's current replication offset | |
redis_replication_slave_repl_offset | Replica Replication Offset | The replication offset of the replica instance | |
redis_replication_link_status | Replication Link Status | Status of the link (up/down) | |
redis_cpu_sys | CPU System | seconds | System CPU consumed by the Redis server |
redis_cpu_sys_children | CPU System Children | seconds | System CPU consumed by the background processes |
redis_cpu_user | CPU User | seconds | User CPU consumed by the Redis server |
redis_cpu_user_children | CPU User Children | seconds | User CPU consumed by the background processes |
redis_stats_keyspace_hits | Keyspace Hits Rate | Rate of number of successful lookup of keys in the main dictionary | |
redis_stats_keyspace_misses | Keyspace Misses Rate | Rate of number of failed lookup of keys in the main dictionary |