Redis 插件

概述

配置参数可用于自定义 Redis 插件的行为。

建议将这些参数指定在它们自己的配置文件中(例如 redis.conf),而不是写入 agent 2 配置文件。然后使用 Include 指令将此文件包含到 Zabbix agent 2 配置中。

除非明确说明该参数为必填,否则所有参数均为可选

请注意:

  • 默认值反映的是进程默认值,而不是随软件提供的配置文件中的值。
  • 值支持环境变量
  • Zabbix 仅支持 UTF-8 编码且不带 BOM 的配置文件。
  • 以 "#" 开头的注释仅在行首支持。

Parameter details

Plugins.Redis.Default.Password

Specify the default password for connecting to Redis.
Used if no value is specified in an item key or named session.

Plugins.Redis.Default.TLSConnect

Specify the level of encryption required for Zabbix agent 2 communications.
An empty or unset value is treated as no TLS.

Range: required - encrypted, unverified (only for testing), verify_ca - encrypted, server certificate, verify_full - encrypted, server certificate and server name verified with SAN

Plugins.Redis.Default.TLSCAFile

Specify full pathname of the file containing the top-level CA(s) certificates.

Plugins.Redis.Default.TLSCertFile

Specify full pathname of the file containing the agent certificate.

Plugins.Redis.Default.TLSKeyFile

Specify full pathname of the file containing the agent private key.

Plugins.Redis.Default.Uri

Specify the default URI for connecting to Redis.
Used if no value is specified in an item key or named session.
Embedded credentials will be ignored. Must match the URI format.
Supported schemes: tcp, unix
A scheme can be omitted.
A port can be omitted (default=6379).

Default: tcp://localhost:6379

Examples:

tcp://localhost:6379
localhost
unix:/var/run/redis.sock
Plugins.Redis.Default.User

Specify the default username for connecting to Redis.
Used if no value is specified in an item key or named session.

Default: default

Plugins.Redis.KeepAlive

Set the maximum time of waiting (in seconds) before unused plugin connections are closed.

Default: 300 Range: 60-900

Plugins.Redis.Sessions.<SessionName>.Password

Specify the named session password for connecting to Redis.
<SessionName> - define the session name to be used in item keys.

Plugins.Redis.Sessions.<SessionName>.TLSConnect

Specify the level of encryption required for Zabbix agent 2 communications for named session.
<SessionName> - define the session name to be used in item keys.
An empty or unset value is treated as no TLS.

Range: required - encrypted, unverified (only for testing), verify_ca - encrypted, server certificate, verify_full - encrypted, server certificate and server name verified with SAN

Plugins.Redis.Sessions.<SessionName>.TLSCAFile

Specify full pathname of the file containing the top-level CA(s) certificates for named session.
<SessionName> - define the session name to be used in item keys.

Mandatory: yes, if Plugins.Redis.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full

Plugins.Redis.Sessions.<SessionName>.TLSCertFile

Specify full pathname of the file containing containing the agent certificate for named session.
<SessionName> - define the session name to be used in item keys.

Plugins.Redis.Sessions.<SessionName>.TLSKeyFile

Specify full pathname of the file containing the agent private key for named session.
<SessionName> - define the session name to be used in item keys.

Plugins.Redis.Sessions.<SessionName>.Uri

Specify the named session URI for connecting to Redis.
<SessionName> - define the session name to be used in item keys.
Embedded credentials will be ignored. Must match the URI format.
Supported schemes: tcp, unix
A scheme can be omitted.
A port can be omitted (default=6379).

Default: tcp://localhost:6379

Examples:

tcp://localhost:6379
localhost
unix:/var/run/redis.sock
Plugins.Redis.Sessions.<SessionName>.User

Specify the named session username for connecting to Redis.
<SessionName> - define the session name to be used in item keys.

Plugins.Redis.Timeout

Set the request execution timeout (the duration, in seconds, to wait for a request to complete before shutting it down).

Default: global timeout Range: 1-30

参数

Parameter Mandatory Range Default Description
Plugins.Redis.Default.Password no 用于连接 Redis 的默认密码;如果在监控项键或命名会话中未指定值,则使用此密码。
Plugins.Redis.Default.TLSConnect no 客户端(Zabbix agent 2)TLS 验证要求。

支持的值:
required - 加密,未验证(仅用于测试)
verify_ca - 加密,服务器证书
verify_full - 加密,服务器证书和服务器名称通过 SAN 验证
空值或未设置的值将视为不使用 tls。
Plugins.Redis.Default.TLSCAFile no 包含顶级 CA 证书的文件的默认完整路径名。
Plugins.Redis.Default.TLSCertFile no 包含 agent 证书的文件的默认完整路径名。
Plugins.Redis.Default.TLSKeyFile no 包含 agent 私钥的文件的默认完整路径名。
Plugins.Redis.Default.Uri no tcp://localhost:6379 连接 Redis 的默认 URI;如果在监控项键或命名会话中未指定值,则使用此 URI。

不应包含嵌入式凭据(它们将被忽略)。
必须符合 URI 格式。
支持的方案:tcpunix;方案可以省略。
端口可以省略(默认值=6379)。
示例:tcp://localhost:6379
localhost
unix:/var/run/redis.sock
Plugins.Redis.Default.User no default 发送到受保护 Redis 服务器的默认用户;如果在监控项键或命名会话中未指定值,则使用此用户。
Plugins.Redis.KeepAlive no 60-900 300 在关闭未使用的插件连接之前的最长等待时间(秒)。
Plugins.Redis.Sessions.<SessionName>.Password no 命名会话密码。
<SessionName> - 定义要在监控项键中使用的会话名称。
Plugins.Redis.Sessions.<SessionName>.TLSConnect no 客户端(Zabbix agent 2)TLS 验证要求。
<SessionName> - 定义要在监控项键中使用的会话名称。

支持的值:
required - 加密,未验证(仅用于测试)
verify_ca - 加密,服务器证书
verify_full - 加密,服务器证书和服务器名称通过 SAN 验证
空值或未设置的值将视为不使用 tls。
Plugins.Redis.Sessions.<SessionName>.TLSCAFile no
(yes, if TLSConnect is verify_ca or verify_full)
用于 Redis 服务器证书验证的、包含顶级 CA 证书的文件完整路径名。
<SessionName> - 定义要在监控项键中使用的会话名称。
Plugins.Redis.Sessions.<SessionName>.TLSCertFile no 用于客户端身份验证的、包含 agent 证书的文件完整路径名。
<SessionName> - 定义要在监控项键中使用的会话名称。
Plugins.Redis.Sessions.<SessionName>.TLSKeyFile no 用于客户端身份验证的、包含 agent 私钥的文件完整路径名。
<SessionName> - 定义要在监控项键中使用的会话名称。
Plugins.Redis.Sessions.<SessionName>.Uri no localhost:6379 命名会话的连接字符串。
<SessionName> - 定义要在监控项键中使用的会话名称。

不应包含嵌入式凭据(它们将被忽略)。
必须符合 URI 格式。
支持的方案:tcpunix;方案可以省略。
端口可以省略(默认值=6379)。
示例:tcp://localhost:6379
localhost
unix:/var/run/redis.sock
Plugins.Redis.Sessions.<SessionName>.User no default 发送到受保护 Redis 服务器的用户。
<SessionName> - 定义要在监控项键中使用的会话名称。
Plugins.Redis.Timeout no 1-30 global timeout 请求执行超时(在关闭请求之前等待其完成的时间,单位为秒)。

另请参见: