Redis

Redis

Redis is an in-memory data structure project implementing a distributed, in-memory key-value database 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.

Available solutions




Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/redis


Template DB Redis

Overview

For Zabbix version: 4.4
The template to monitor Redis server by Zabbix that work without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.

Template Db Redis — collects metrics by polling a New Zabbix Agent (zabbix-agent2).

This template was tested on:

  • Redis, version 5.0.6, 4.0.14, 3.0.6

Setup

Setup and configure a New Zabbix Agent compiled with the Redis monitoring plugin (ZBXNEXT-5428-4.3).

Test availability: zabbix_get -s redis-master -k redis.ping

Zabbix configuration

No specific Zabbix configuration is required.

Macros used

Name Description Default
{$REDIS.CLIENTS.PRC.MAX.WARN}

Maximum percentage of connected clients

80
{$REDIS.CONN.URI}

Connection string in the URI format (password is not used). This param overwrites a value configured in the "Server" option of the configuration file (if it's set), otherwise, the plugin's default value is used: "tcp://localhost:6379"

tcp://localhost:6379
{$REDIS.LLD.FILTER.DB.MATCHES}

Filter of discoverable databases

.*
{$REDIS.LLD.FILTER.DB.NOT_MATCHES}

Filter to exclude discovered databases

CHANGE_IF_NEEDED
{$REDIS.LLD.PROCESS_NAME}

Redis server process name for LLD

redis-server
{$REDIS.MEM.FRAG_RATIO.MAX.WARN}

Maximum memory fragmentation ratio

1.5
{$REDIS.MEM.PUSED.MAX.WARN}

Maximum percentage of memory used

90
{$REDIS.PROCESS_NAME}

Redis server process name

redis-server
{$REDIS.REPL.LAG.MAX.WARN}

Maximum replication lag in seconds

30s
{$REDIS.SLOWLOG.COUNT.MAX.WARN}

Maximum number of slowlog entries per second

1

Template links

There are no template links in this template.

Discovery rules

Name Description Type Key and additional info
Keyspace discovery

Individual keyspace metrics

DEPENDENT redis.keyspace.discovery

Preprocessing:

- JAVASCRIPT: return JSON.stringify(Object.keys(JSON.parse(value).Keyspace) .map(function (v){return {"{#DB}": v}}));

Filter:

AND

- A: {#DB} MATCHES_REGEX {$REDIS.LLD.FILTER.DB.MATCHES}

- B: {#DB} NOT_MATCHES_REGEX {$REDIS.LLD.FILTER.DB.NOT_MATCHES}

AOF metrics discovery

If AOF is activated, additional metrics will be added

DEPENDENT redis.persistence.aof.discovery

Preprocessing:

- JAVASCRIPT: return JSON.stringify(JSON.parse(value).Persistence.aof_enabled === '1' ? [{'{#SINGLETON}': ''}] : []);

Slave metrics discovery

If the instance is a replica, additional metrics are provided

DEPENDENT redis.replication.slave.discovery

Preprocessing:

- JAVASCRIPT: return JSON.stringify(JSON.parse(value).Replication.role === 'slave' ? [{'{#SINGLETON}': ''}] : []);

Replication metrics discovery

If the instance is the master and the slaves are connected, additional metrics are provided

DEPENDENT redis.replication.master.discovery

Preprocessing:

- JAVASCRIPT: var repl = JSON.parse(value).Replication; return JSON.stringify(Object.keys(repl) .filter(function (v) {return v.match(/slave\d+/)}) .map(function (v){ return {"{#SLAVE_IP}": repl[v].ip, "{#SLAVE_PORT}": repl[v].port} }));

Process metrics discovery

Collect metrics by Zabbix agent if it exists

ZABBIX_PASSIVE proc.num["{$REDIS.LLD.PROCESS_NAME}"]

Preprocessing:

- JAVASCRIPT: return JSON.stringify(value > 0 ? [{'{#SINGLETON}': ''}] : []);

Version 4+ metrics discovery

Additional metrics for versions 4+

DEPENDENT redis.metrics.v4.discovery

Preprocessing:

- JSONPATH: $.Server.redis_version

- JAVASCRIPT: return JSON.stringify(parseInt(value.split('.')[0]) >= 4 ? [{'{#SINGLETON}': ''}] : []);

Version 5+ metrics discovery

Additional metrics for versions 5+

DEPENDENT redis.metrics.v5.discovery

Preprocessing:

- JSONPATH: $.Server.redis_version

- JAVASCRIPT: return JSON.stringify(parseInt(value.split('.')[0]) >= 5 ? [{'{#SINGLETON}': ''}] : []);

Items collected

Group Name Description Type Key and additional info
Redis Redis: Ping ZABBIX_PASSIVE redis.ping["{$REDIS.CONN.URI}"]

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 10m

Redis Redis: Slowlog entries per second ZABBIX_PASSIVE redis.slowlog.count["{$REDIS.CONN.URI}"]

Preprocessing:

- CHANGE_PER_SECOND

Redis Redis: CPU sys

System CPU consumed by the Redis server

DEPENDENT redis.cpu.sys

Preprocessing:

- JSONPATH: $.CPU.used_cpu_sys

Redis Redis: CPU sys children

System CPU consumed by the background processes

DEPENDENT redis.cpu.sys_children

Preprocessing:

- JSONPATH: $.CPU.used_cpu_sys_children

Redis Redis: CPU user

User CPU consumed by the Redis server

DEPENDENT redis.cpu.user

Preprocessing:

- JSONPATH: $.CPU.used_cpu_user

Redis Redis: CPU user children

User CPU consumed by the background processes

DEPENDENT redis.cpu.user_children

Preprocessing:

- JSONPATH: $.CPU.used_cpu_user_children

Redis Redis: Blocked clients

The number of connections waiting on a blocking call

DEPENDENT redis.clients.blocked

Preprocessing:

- JSONPATH: $.Clients.blocked_clients

Redis Redis: Max input buffer

The biggest input buffer among current client connections

DEPENDENT redis.clients.max_input_buffer

Preprocessing:

- JAVASCRIPT: var clients = JSON.parse(value).Clients return clients.client_recent_max_input_buffer | | clients.client_biggest_input_buf

Redis Redis: Max output buffer

The biggest output buffer among current client connections

DEPENDENT redis.clients.max_output_buffer

Preprocessing:

- JAVASCRIPT: var clients = JSON.parse(value).Clients return clients.client_recent_max_output_buffer | | clients.client_longest_output_list

Redis Redis: Connected clients

The number of connected clients

DEPENDENT redis.clients.connected

Preprocessing:

- JSONPATH: $.Clients.connected_clients

Redis Redis: Cluster enabled

Indicate Redis cluster is enabled

DEPENDENT redis.cluster.enabled

Preprocessing:

- JSONPATH: $.Cluster.cluster_enabled

Redis Redis: Memory used

Total number of bytes allocated by Redis using its allocator

DEPENDENT redis.memory.used_memory

Preprocessing:

- JSONPATH: $.Memory.used_memory

Redis Redis: Memory used Lua

Amount of memory used by the Lua engine

DEPENDENT redis.memory.used_memory_lua

Preprocessing:

- JSONPATH: $.Memory.used_memory_lua

Redis Redis: Memory used peak

Peak memory consumed by Redis (in bytes)

DEPENDENT redis.memory.used_memory_peak

Preprocessing:

- JSONPATH: $.Memory.used_memory_peak

Redis Redis: Memory used RSS

Number of bytes that Redis allocated as seen by the operating system

DEPENDENT redis.memory.used_memory_rss

Preprocessing:

- JSONPATH: $.Memory.used_memory_rss

Redis Redis: Memory fragmentation ratio

This ratio is an indication of memory mapping efficiency:

— Value over 1.0 indicate that memory fragmentation is very likely. Consider restarting the Redis server so the operating system can recover fragmented memory, especially with a ratio over 1.5.

— Value under 1.0 indicate that Redis likely has insufficient memory available. Consider optimizing memory usage or adding more RAM.

Note: If your peak memory usage is much higher than your current memory usage, the memory fragmentation ratio may be unreliable.

https://redis.io/topics/memory-optimization

DEPENDENT redis.memory.fragmentation_ratio

Preprocessing:

- JSONPATH: $.Memory.mem_fragmentation_ratio

Redis Redis: AOF current rewrite time sec

Duration of the on-going AOF rewrite operation if any

DEPENDENT redis.persistence.aof_current_rewrite_time_sec

Preprocessing:

- JSONPATH: $.Persistence.aof_current_rewrite_time_sec

Redis Redis: AOF enabled

Flag indicating AOF logging is activated

DEPENDENT redis.persistence.aof_enabled

Preprocessing:

- JSONPATH: $.Persistence.aof_enabled

Redis Redis: AOF last bgrewrite status

Status of the last AOF rewrite operation

DEPENDENT redis.persistence.aof_last_bgrewrite_status

Preprocessing:

- JSONPATH: $.Persistence.aof_last_bgrewrite_status

- BOOL_TO_DECIMAL

Redis Redis: AOF last rewrite time sec

Duration of the last AOF rewrite

DEPENDENT redis.persistence.aof_last_rewrite_time_sec

Preprocessing:

- JSONPATH: $.Persistence.aof_last_rewrite_time_sec

Redis Redis: AOF last write status

Status of the last write operation to the AOF

DEPENDENT redis.persistence.aof_last_write_status

Preprocessing:

- JSONPATH: $.Persistence.aof_last_write_status

- BOOL_TO_DECIMAL

Redis Redis: AOF rewrite in progress

Flag indicating a AOF rewrite operation is on-going

DEPENDENT redis.persistence.aof_rewrite_in_progress

Preprocessing:

- JSONPATH: $.Persistence.aof_rewrite_in_progress

Redis Redis: AOF rewrite scheduled

Flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete

DEPENDENT redis.persistence.aof_rewrite_scheduled

Preprocessing:

- JSONPATH: $.Persistence.aof_rewrite_scheduled

Redis Redis: Dump loading

Flag indicating if the load of a dump file is on-going

DEPENDENT redis.persistence.loading

Preprocessing:

- JSONPATH: $.Persistence.loading

Redis Redis: RDB bgsave in progress

"1" if bgsave is in progress and "0" otherwise

DEPENDENT redis.persistence.rdb_bgsave_in_progress

Preprocessing:

- JSONPATH: $.Persistence.rdb_bgsave_in_progress

Redis Redis: RDB changes since last save

Number of changes since the last background save

DEPENDENT redis.persistence.rdb_changes_since_last_save

Preprocessing:

- JSONPATH: $.Persistence.rdb_changes_since_last_save

Redis Redis: RDB current bgsave time sec

Duration of the on-going RDB save operation if any

DEPENDENT redis.persistence.rdb_current_bgsave_time_sec

Preprocessing:

- JSONPATH: $.Persistence.rdb_current_bgsave_time_sec

Redis Redis: RDB last bgsave status

Status of the last RDB save operation

DEPENDENT redis.persistence.rdb_last_bgsave_status

Preprocessing:

- JSONPATH: $.Persistence.rdb_last_bgsave_status

- BOOL_TO_DECIMAL

Redis Redis: RDB last bgsave time sec

Duration of the last bg_save operation

DEPENDENT redis.persistence.rdb_last_bgsave_time_sec

Preprocessing:

- JSONPATH: $.Persistence.rdb_last_bgsave_time_sec

Redis Redis: RDB last save time

Epoch-based timestamp of last successful RDB save

DEPENDENT redis.persistence.rdb_last_save_time

Preprocessing:

- JSONPATH: $.Persistence.rdb_last_save_time

Redis Redis: Connected slaves

Number of connected slaves

DEPENDENT redis.replication.connected_slaves

Preprocessing:

- JSONPATH: $.Replication.connected_slaves

Redis Redis: Replication backlog active

Flag indicating replication backlog is active

DEPENDENT redis.replication.repl_backlog_active

Preprocessing:

- JSONPATH: $.Replication.repl_backlog_active

Redis Redis: Replication backlog first byte offset

The master offset of the replication backlog buffer

DEPENDENT redis.replication.repl_backlog_first_byte_offset

Preprocessing:

- JSONPATH: $.Replication.repl_backlog_first_byte_offset

Redis Redis: Replication backlog history length

Amount of data in the backlog sync buffer

DEPENDENT redis.replication.repl_backlog_histlen

Preprocessing:

- JSONPATH: $.Replication.repl_backlog_histlen

Redis Redis: Replication backlog size

Total size in bytes of the replication backlog buffer

DEPENDENT redis.replication.repl_backlog_size

Preprocessing:

- JSONPATH: $.Replication.repl_backlog_size

Redis Redis: Replication role

Value is "master" if the instance is replica of no one, or "slave" if the instance is a replica of some master instance. Note that a replica can be master of another replica (chained replication).

DEPENDENT redis.replication.role

Preprocessing:

- JSONPATH: $.Replication.role

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Master replication offset

Replication offset reported by the master

DEPENDENT redis.replication.master_repl_offset

Preprocessing:

- JSONPATH: $.Replication.master_repl_offset

Redis Redis: Process id

PID of the server process

DEPENDENT redis.server.process_id

Preprocessing:

- JSONPATH: $.Server.process_id

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Redis mode

The server's mode ("standalone", "sentinel" or "cluster")

DEPENDENT redis.server.redis_mode

Preprocessing:

- JSONPATH: $.Server.redis_mode

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Redis version

Version of the Redis server

DEPENDENT redis.server.redis_version

Preprocessing:

- JSONPATH: $.Server.redis_version

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: TCP port

TCP/IP listen port

DEPENDENT redis.server.tcp_port

Preprocessing:

- JSONPATH: $.Server.tcp_port

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Uptime

Number of seconds since Redis server start

DEPENDENT redis.server.uptime

Preprocessing:

- JSONPATH: $.Server.uptime_in_seconds

Redis Redis: Evicted keys

Number of evicted keys due to maxmemory limit

DEPENDENT redis.stats.evicted_keys

Preprocessing:

- JSONPATH: $.Stats.evicted_keys

Redis Redis: Expired keys

Total number of key expiration events

DEPENDENT redis.stats.expired_keys

Preprocessing:

- JSONPATH: $.Stats.expired_keys

Redis Redis: Instantaneous input bytes per second

The network's read rate per second in KB/sec

DEPENDENT redis.stats.instantaneous_input.rate

Preprocessing:

- JSONPATH: $.Stats.instantaneous_input_kbps

- MULTIPLIER: 1024

Redis Redis: Instantaneous operations per sec

Number of commands processed per second

DEPENDENT redis.stats.instantaneous_ops.rate

Preprocessing:

- JSONPATH: $.Stats.instantaneous_ops_per_sec

Redis Redis: Instantaneous output bytes per second

The network's write rate per second in KB/sec

DEPENDENT redis.stats.instantaneous_output.rate

Preprocessing:

- JSONPATH: $.Stats.instantaneous_output_kbps

- MULTIPLIER: 1024

Redis Redis: Keyspace hits

Number of successful lookup of keys in the main dictionary

DEPENDENT redis.stats.keyspace_hits

Preprocessing:

- JSONPATH: $.Stats.keyspace_hits

Redis Redis: Keyspace misses

Number of failed lookup of keys in the main dictionary

DEPENDENT redis.stats.keyspace_misses

Preprocessing:

- JSONPATH: $.Stats.keyspace_misses

Redis Redis: Latest fork usec

Duration of the latest fork operation in microseconds

DEPENDENT redis.stats.latest_fork_usec

Preprocessing:

- JSONPATH: $.Stats.latest_fork_usec

- MULTIPLIER: 1.0E-5

Redis Redis: Migrate cached sockets

The number of sockets open for MIGRATE purposes

DEPENDENT redis.stats.migrate_cached_sockets

Preprocessing:

- JSONPATH: $.Stats.migrate_cached_sockets

Redis Redis: Pubsub channels

Global number of pub/sub channels with client subscriptions

DEPENDENT redis.stats.pubsub_channels

Preprocessing:

- JSONPATH: $.Stats.pubsub_channels

Redis Redis: Pubsub patterns

Global number of pub/sub pattern with client subscriptions

DEPENDENT redis.stats.pubsub_patterns

Preprocessing:

- JSONPATH: $.Stats.pubsub_patterns

Redis Redis: Rejected connections

Number of connections rejected because of maxclients limit

DEPENDENT redis.stats.rejected_connections

Preprocessing:

- JSONPATH: $.Stats.rejected_connections

Redis Redis: Sync full

The number of full resyncs with replicas

DEPENDENT redis.stats.sync_full

Preprocessing:

- JSONPATH: $.Stats.sync_full

Redis Redis: Sync partial err

The number of denied partial resync requests

DEPENDENT redis.stats.sync_partial_err

Preprocessing:

- JSONPATH: $.Stats.sync_partial_err

Redis Redis: Sync partial ok

The number of accepted partial resync requests

DEPENDENT redis.stats.sync_partial_ok

Preprocessing:

- JSONPATH: $.Stats.sync_partial_ok

Redis Redis: Total commands processed

Total number of commands processed by the server

DEPENDENT redis.stats.total_commands_processed

Preprocessing:

- JSONPATH: $.Stats.total_commands_processed

Redis Redis: Total connections received

Total number of connections accepted by the server

DEPENDENT redis.stats.total_connections_received

Preprocessing:

- JSONPATH: $.Stats.total_connections_received

Redis Redis: Total net input bytes

The total number of bytes read from the network

DEPENDENT redis.stats.total_net_input_bytes

Preprocessing:

- JSONPATH: $.Stats.total_net_input_bytes

Redis Redis: Total net output bytes

The total number of bytes written to the network

DEPENDENT redis.stats.total_net_output_bytes

Preprocessing:

- JSONPATH: $.Stats.total_net_output_bytes

Redis Redis: Max clients

Max number of connected clients at the same time.

Once the limit is reached Redis will close all the new connections sending an error "max number of clients reached".

DEPENDENT redis.config.maxclients

Preprocessing:

- JSONPATH: $.maxclients

- DISCARD_UNCHANGED_HEARTBEAT: 30m

Redis DB {#DB}: Average TTL

Average TTL

DEPENDENT redis.db.avg_ttl["{#DB}"]

Preprocessing:

- JSONPATH: $.Keyspace["{#DB}"].avg_ttl

- MULTIPLIER: 0.001

Redis DB {#DB}: Expires

Number of keys with an expiration

DEPENDENT redis.db.expires["{#DB}"]

Preprocessing:

- JSONPATH: $.Keyspace["{#DB}"].expires

Redis DB {#DB}: Keys

Total number of keys

DEPENDENT redis.db.keys["{#DB}"]

Preprocessing:

- JSONPATH: $.Keyspace["{#DB}"].keys

Redis Redis: AOF current size{#SINGLETON}

AOF current file size

DEPENDENT redis.persistence.aof_current_size[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_current_size

Redis Redis: AOF base size{#SINGLETON}

AOF file size on latest startup or rewrite

DEPENDENT redis.persistence.aof_base_size[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_base_size

Redis Redis: AOF pending rewrite{#SINGLETON}

Flag indicating an AOF rewrite operation will

DEPENDENT redis.persistence.aof_pending_rewrite[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_pending_rewrite

Redis Redis: AOF buffer length{#SINGLETON}

Size of the AOF buffer

DEPENDENT redis.persistence.aof_buffer_length[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_buffer_length

Redis Redis: AOF rewrite buffer length{#SINGLETON}

Size of the AOF rewrite buffer

DEPENDENT redis.persistence.aof_rewrite_buffer_length[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_rewrite_buffer_length

Redis Redis: AOF pending background I/O fsync{#SINGLETON}

Number of fsync pending jobs in background I/O queue

DEPENDENT redis.persistence.aof_pending_bio_fsync[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_pending_bio_fsync

Redis Redis: AOF delayed fsync{#SINGLETON}

Delayed fsync counter

DEPENDENT redis.persistence.aof_delayed_fsync[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_delayed_fsync

Redis Redis: Master host{#SINGLETON}

Host or IP address of the master

DEPENDENT redis.replication.master_host[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.master_host

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Master port{#SINGLETON}

Master listening TCP port

DEPENDENT redis.replication.master_port[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.master_port

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Master link status{#SINGLETON}

Status of the link (up/down)

DEPENDENT redis.replication.master_link_status[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.master_link_status

- BOOL_TO_DECIMAL

Redis Redis: Master last I/O seconds ago{#SINGLETON}

Number of seconds since the last interaction with master

DEPENDENT redis.replication.master_last_io_seconds_ago[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.master_last_io_seconds_ago

Redis Redis: Master sync in progress{#SINGLETON}

Indicate the master is syncing to the replica

DEPENDENT redis.replication.master_sync_in_progress[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.master_sync_in_progress

Redis Redis: Slave replication offset{#SINGLETON}

The replication offset of the replica instance

DEPENDENT redis.replication.slave_repl_offset[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.slave_repl_offset

Redis Redis: Slave priority{#SINGLETON}

The priority of the instance as a candidate for failover

DEPENDENT redis.replication.slave_priority[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.slave_priority

Redis Redis: Slave priority{#SINGLETON}

Flag indicating if the replica is read-only

DEPENDENT redis.replication.slave_read_only[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.slave_read_only

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis slave {#SLAVE_IP}:{#SLAVE_PORT}: Replication lag in bytes

Replication lag in bytes

DEPENDENT redis.replication.lag_bytes["{#SLAVE_IP}:{#SLAVE_PORT}"]

Preprocessing:

- JAVASCRIPT: var repl = JSON.parse(value).Replication; var res = Object.keys(repl) .filter(function (v) {return v.match(/slave\d+/)}) .filter(function (v) {return (repl[v].ip === "{#SLAVE_IP}" && repl[v].port === "{#SLAVE_PORT}")}) .map(function (v) {return repl[v].offset})[0]; if (res === undefined) { throw 'Slave {#SLAVE_IP}:{#SLAVE_PORT} is no longer available.'; } return res;

Redis Redis: Number of processes running

-

ZABBIX_PASSIVE proc.num["{$REDIS.PROCESS_NAME}{#SINGLETON}"]
Redis Redis: Memory usage (rss)

Resident set size memory used by process in bytes.

ZABBIX_PASSIVE proc.mem["{$REDIS.PROCESS_NAME}{#SINGLETON}",,,,rss]
Redis Redis: Memory usage (vsize)

Virtual memory size used by process in bytes.

ZABBIX_PASSIVE proc.mem["{$REDIS.PROCESS_NAME}{#SINGLETON}",,,,vsize]
Redis Redis: CPU utilization

Process CPU utilization percentage.

ZABBIX_PASSIVE proc.cpu.util["{$REDIS.PROCESS_NAME}{#SINGLETON}"]
Redis Redis: Executable path{#SINGLETON}

The path to the server's executable

DEPENDENT redis.server.executable[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Server.executable

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Memory used peak %{#SINGLETON}

The percentage of used_memory_peak out of used_memory

DEPENDENT redis.memory.used_memory_peak_perc[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.used_memory_peak_perc

- REGEX: (.+)% \1

Redis Redis: Memory used overhead{#SINGLETON}

The sum in bytes of all overheads that the server allocated for managing its internal data structures

DEPENDENT redis.memory.used_memory_overhead[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.used_memory_overhead

Redis Redis: Memory used startup{#SINGLETON}

Initial amount of memory consumed by Redis at startup in bytes

DEPENDENT redis.memory.used_memory_startup[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.used_memory_startup

Redis Redis: Memory used dataset{#SINGLETON}

The size in bytes of the dataset

DEPENDENT redis.memory.used_memory_dataset[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.used_memory_dataset

Redis Redis: Memory used dataset %{#SINGLETON}

The percentage of used_memory_dataset out of the net memory usage (used_memory minus used_memory_startup)

DEPENDENT redis.memory.used_memory_dataset_perc[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.used_memory_dataset_perc

- REGEX: (.+)% \1

Redis Redis: Total system memory{#SINGLETON}

The total amount of memory that the Redis host has

DEPENDENT redis.memory.total_system_memory[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.total_system_memory

Redis Redis: Max memory{#SINGLETON}

Maximum amount of memory allocated to the Redisdb system

DEPENDENT redis.memory.maxmemory[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.maxmemory

Redis Redis: Max memory policy{#SINGLETON}

The value of the maxmemory-policy configuration directive

DEPENDENT redis.memory.maxmemory_policy[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.maxmemory_policy

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Redis Redis: Active defrag running{#SINGLETON}

Flag indicating if active defragmentation is active

DEPENDENT redis.memory.active_defrag_running[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.active_defrag_running

Redis Redis: Lazyfree pending objects{#SINGLETON}

The number of objects waiting to be freed (as a result of calling UNLINK, or FLUSHDB and FLUSHALL with the ASYNC option)

DEPENDENT redis.memory.lazyfree_pending_objects[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.lazyfree_pending_objects

Redis Redis: RDB last CoW size{#SINGLETON}

The size in bytes of copy-on-write allocations during the last RDB save operation

DEPENDENT redis.persistence.rdb_last_cow_size[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.rdb_last_cow_size

Redis Redis: AOF last CoW size{#SINGLETON}

The size in bytes of copy-on-write allocations during the last AOF rewrite operation

DEPENDENT redis.persistence.aof_last_cow_size[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Persistence.aof_last_cow_size

Redis Redis: Expired stale %{#SINGLETON} DEPENDENT redis.stats.expired_stale_perc[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.expired_stale_perc

Redis Redis: Expired time cap reached count{#SINGLETON} DEPENDENT redis.stats.expired_time_cap_reached_count[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.expired_time_cap_reached_count

Redis Redis: Slave expires tracked keys{#SINGLETON}

The number of keys tracked for expiry purposes (applicable only to writable replicas)

DEPENDENT redis.stats.slave_expires_tracked_keys[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.slave_expires_tracked_keys

Redis Redis: Active defrag hits{#SINGLETON}

Number of value reallocations performed by active the defragmentation process

DEPENDENT redis.stats.active_defrag_hits[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.active_defrag_hits

Redis Redis: Active defrag misses{#SINGLETON}

Number of aborted value reallocations started by the active defragmentation process

DEPENDENT redis.stats.active_defrag_misses[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.active_defrag_misses

Redis Redis: Active defrag key hits{#SINGLETON}

Number of keys that were actively defragmented

DEPENDENT redis.stats.active_defrag_key_hits[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.active_defrag_key_hits

Redis Redis: Active defrag key misses{#SINGLETON}

Number of keys that were skipped by the active defragmentation process

DEPENDENT redis.stats.active_defrag_key_misses[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Stats.active_defrag_key_misses

Redis Redis: Replication second offset{#SINGLETON}

Offset up to which replication IDs are accepted

DEPENDENT redis.replication.second_repl_offset[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Replication.second_repl_offset

Redis Redis: Allocator active{#SINGLETON} DEPENDENT redis.memory.allocator_active[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_active

Redis Redis: Allocator allocated{#SINGLETON} DEPENDENT redis.memory.allocator_allocated[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_allocated

Redis Redis: Allocator resident{#SINGLETON} DEPENDENT redis.memory.allocator_resident[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_resident

Redis Redis: Memory used scripts{#SINGLETON} DEPENDENT redis.memory.used_memory_scripts[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.used_memory_scripts

Redis Redis: Memory number of cached scripts{#SINGLETON} DEPENDENT redis.memory.number_of_cached_scripts[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.number_of_cached_scripts

Redis Redis: Allocator fragmentation bytes{#SINGLETON} DEPENDENT redis.memory.allocator_frag_bytes[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_frag_bytes

Redis Redis: Allocator fragmentation ratio{#SINGLETON} DEPENDENT redis.memory.allocator_frag_ratio[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_frag_ratio

Redis Redis: Allocator RSS bytes{#SINGLETON} DEPENDENT redis.memory.allocator_rss_bytes[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_rss_bytes

Redis Redis: Allocator RSS ratio{#SINGLETON} DEPENDENT redis.memory.allocator_rss_ratio[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.allocator_rss_ratio

Redis Redis: Memory RSS overhead bytes{#SINGLETON} DEPENDENT redis.memory.rss_overhead_bytes[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.rss_overhead_bytes

Redis Redis: Memory RSS overhead ratio{#SINGLETON} DEPENDENT redis.memory.rss_overhead_ratio[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.rss_overhead_ratio

Redis Redis: Memory fragmentation bytes{#SINGLETON} DEPENDENT redis.memory.fragmentation_bytes[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.mem_fragmentation_bytes

Redis Redis: Memory not counted for evict{#SINGLETON} DEPENDENT redis.memory.not_counted_for_evict[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.mem_not_counted_for_evict

Redis Redis: Memory replication backlog{#SINGLETON} DEPENDENT redis.memory.replication_backlog[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.mem_replication_backlog

Redis Redis: Memory clients normal{#SINGLETON} DEPENDENT redis.memory.mem_clients_normal[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.mem_clients_normal

Redis Redis: Memory clients slaves{#SINGLETON} DEPENDENT redis.memory.mem_clients_slaves[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.mem_clients_slaves

Redis Redis: Memory AOF buffer{#SINGLETON}

Size of the AOF buffer

DEPENDENT redis.memory.mem_aof_buffer[{#SINGLETON}]

Preprocessing:

- JSONPATH: $.Memory.mem_aof_buffer

Zabbix_raw_items Redis: Get info ZABBIX_PASSIVE redis.info["{$REDIS.CONN.URI}"]
Zabbix_raw_items Redis: Get config ZABBIX_PASSIVE redis.config["{$REDIS.CONN.URI}"]

Preprocessing:

- DISCARD_UNCHANGED_HEARTBEAT: 1h

Triggers

Name Description Expression Severity Dependencies and additional info
Redis: Service is down

-

{TEMPLATE_NAME:redis.ping["{$REDIS.CONN.URI}"].last()}=0 AVERAGE

Manual close: YES

Redis: Too many entries in the slowlog (over {$REDIS.SLOWLOG.COUNT.MAX.WARN} per second in 5m)

-

{TEMPLATE_NAME:redis.slowlog.count["{$REDIS.CONN.URI}"].min(5m)}>{$REDIS.SLOWLOG.COUNT.MAX.WARN} INFO
Redis: Total number of connected clients is too high (over {$REDIS.CLIENTS.PRC.MAX.WARN}% in 5m)

When the number of clients reaches the value of the "maxclients" parameter, new connections will be rejected.

https://redis.io/topics/clients#maximum-number-of-clients

{TEMPLATE_NAME:redis.clients.connected.min(5m)}/{Template DB Redis:redis.config.maxclients.last()}*100>{$REDIS.CLIENTS.PRC.MAX.WARN} WARNING
Redis: Memory fragmentation ratio is too high (over {$REDIS.MEM.FRAG_RATIO.MAX.WARN} in 15m)

This ratio is an indication of memory mapping efficiency:

— Value over 1.0 indicate that memory fragmentation is very likely. Consider restarting the Redis server so the operating system can recover fragmented memory, especially with a ratio over 1.5.

— Value under 1.0 indicate that Redis likely has insufficient memory available. Consider optimizing memory usage or adding more RAM.

Note: If your peak memory usage is much higher than your current memory usage, the memory fragmentation ratio may be unreliable.

https://redis.io/topics/memory-optimization

{TEMPLATE_NAME:redis.memory.fragmentation_ratio.min(15m)}>{$REDIS.MEM.FRAG_RATIO.MAX.WARN} WARNING
Redis: Last AOF write operation failed

Detailed information about persistence: https://redis.io/topics/persistence

{TEMPLATE_NAME:redis.persistence.aof_last_write_status.last()}=0 WARNING
Redis: Last RDB save operation failed

Detailed information about persistence: https://redis.io/topics/persistence

{TEMPLATE_NAME:redis.persistence.rdb_last_bgsave_status.last()}=0 WARNING
Redis: Number of slaves has changed

Redis number of slaves has changed. Ack to close.

{TEMPLATE_NAME:redis.replication.connected_slaves.diff()}=1 INFO

Manual close: YES

Redis: Replication role has changed (new role: {ITEM.VALUE})

Redis replication role has changed. Ack to close.

{TEMPLATE_NAME:redis.replication.role.diff()}=1 and {TEMPLATE_NAME:redis.replication.role.strlen()}>0 WARNING

Manual close: YES

Redis: Version has changed (new version: {ITEM.VALUE})

Redis version has changed. Ack to close.

{TEMPLATE_NAME:redis.server.redis_version.diff()}=1 and {TEMPLATE_NAME:redis.server.redis_version.strlen()}>0 INFO

Manual close: YES

Redis: has been restarted (uptime < 10m)

Uptime is less than 10 minutes

{TEMPLATE_NAME:redis.server.uptime.last()}<10m INFO

Manual close: YES

Redis: Connections are rejected

The number of connections has reached the value of "maxclients".

https://redis.io/topics/clients

{TEMPLATE_NAME:redis.stats.rejected_connections.last()}>0 HIGH
Redis: Replication lag with master is too high (over {$REDIS.REPL.LAG.MAX.WARN} in 5m)

-

{TEMPLATE_NAME:redis.replication.master_last_io_seconds_ago[{#SINGLETON}].min(5m)}>{$REDIS.REPL.LAG.MAX.WARN} WARNING
Redis: Process is not running

-

{TEMPLATE_NAME:proc.num["{$REDIS.PROCESS_NAME}{#SINGLETON}"].last()}=0 HIGH
Redis: Memory usage is too high (over {$REDIS.MEM.PUSED.MAX.WARN}% in 5m)

-

{TEMPLATE_NAME:redis.memory.maxmemory[{#SINGLETON}].min(5m)}/{Template DB Redis:redis.memory.used_memory.last()}*100>{$REDIS.MEM.PUSED.MAX.WARN} WARNING
Redis: Failed to fetch info data (or no data for 30m)

Zabbix has not received data for items for the last 30 minutes

{TEMPLATE_NAME:redis.info["{$REDIS.CONN.URI}"].nodata(30m)}=1 WARNING

Manual close: YES

Depends on:

- Redis: Service is down

Redis: Configuration has changed

Redis configuration has changed. Ack to close.

{TEMPLATE_NAME:redis.config["{$REDIS.CONN.URI}"].diff()}=1 and {TEMPLATE_NAME:redis.config["{$REDIS.CONN.URI}"].strlen()}>0 INFO

Manual close: YES

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.

Articles and documentation

+ Propose new article
Add your solution