The Redis plugin in Zabbix agent 2 provides a native Zabbix solution for monitoring Redis servers (the in-memory data structure store).
The Redis plugin is available since Zabbix agent 2 version 4.4.5.
An updated plugin version, described on this page, is available since Zabbix 4.4.8
The plugin uses the RESP protocol (over TCP and Unix-sockets) implementation in order to gather all necessary metrics.
An official Redis template is available, which you may extend as needed or create your own template.
The plugin is supplied as part of Zabbix agent 2, and it does not require any special installation steps. Once Zabbix agent 2 installed, the plugin is ready to work. The only thing you need to do is to make sure that a Redis instance is available for connection.
The plugin uses the configuration file of Zabbix agent 2 for its parameters.
The plugin supports gathering metrics from multiple Redis instances simultaneously. Both local and remote instances can be monitored. TCP and Unix-socket connections are supported.
The plugin keeps connections to Redis instances in the opened state. The benefits are reduced network congestion, latency and CPU and memory usage due to the lower number of connections. The client library takes care of this.
Underlying every connection is a pool of connections. A connection is initialized at the same time when the first metric request (that needs a connection) is performed (lazy connection):
Plugin.Redis.Timeout
configuration parameter);Plugin.Redis.KeepAlive
configuration parameter).The plugin can authenticate using the password specified as a key parameter or within named sessions. Embedded URI credentials (userinfo) will be ignored.
Named sessions allow you to define specific parameters for each Redis instance. Currently, only two parameters are supported: Uri
and Password
. Those can be useful if you have multiple instances with different credentials. E.g: if you have two instances: "Redis1" and "Redis2", you need to add these options to your agent 2 configuration:
Plugins.Redis.Sessions.Redis1.Uri=tcp://127.0.0.1:6379
Plugins.Redis.Sessions.Redis1.Password=<PasswordForRedis1>
Plugins.Redis.Sessions.Redis2.Uri=tcp://127.0.0.1:6380
Plugins.Redis.Sessions.Redis2.Password=<PasswordForRedis2>
Then you can use these names as connString
in the item keys instead of URIs, e.g:
Named sessions provide a more secure way to store credentials compared to item key parameters or user macros.
The following items are supported:
See also: Agent 2 item keys
There are four levels of parameter overwriting:
The plugin uses Zabbix agent logs. Increase the debug level on the Zabbix agent to view more information in the logs.