Modbus 插件
概述
配置参数可用于自定义 Modbus 插件的行为。
建议将这些参数指定在它们自己的配置文件中(例如 modbus.conf),而不是放在 agent 2 配置文件中。然后使用 Include 指令将此文件包含到 Zabbix agent 2 配置中。
除非明确说明该参数为必填,否则所有参数均为可选。
请注意:
Parameter details
Plugins.Modbus.Sessions.<SessionName>.Endpoint
Specify the named session endpoint for connecting to Modbus.
The connection string consists of a protocol scheme, a host address and a port or serial port name and attributes.
<SessionName> - define name of a session for using in item keys.
Plugins.Modbus.Sessions.<SessionName>.SlaveID
Specify the named session slave ID for connecting to Modbus.
<SessionName> - define name of a session for using in item keys.
Example: Plugins.Modbus.Sessions.MB1.SlaveID=20
Note that this named session parameter is checked only if the value provided in the item key slave ID parameter is empty.
Plugins.Modbus.Sessions.<SessionName>.Timeout
Set the named session timeout in seconds.
<SessionName> - define name of a session for using in item keys.
Example: Plugins.Modbus.Sessions.MB1.Timeout=2
If you need to set the request execution timeout (how long to wait for a request to complete before shutting it down), use the item configuration form.
参数
| Parameter | Mandatory | Range | Default | Description |
|---|---|---|---|---|
| Plugins.Modbus.Sessions.<SessionName>.Endpoint | no | Endpoint 是由协议方案、主机地址以及端口或串口名称和属性组成的连接字符串。 <SessionName> - 定义一个会话名称,用于监控项键值中。 |
||
| Plugins.Modbus.Sessions.<SessionName>.SlaveID | no | 命名会话的从站 ID。 <SessionName> - 定义一个会话名称,用于监控项键值中。 示例: Plugins.Modbus.Sessions.MB1.SlaveID=20注意,只有在 监控项键值 中提供的 slave ID 参数值为空时,才会检查此命名会话参数。 |
||
| Plugins.Modbus.Sessions.<SessionName>.Timeout | no | 命名会话的超时时间,单位为秒。 <SessionName> - 定义一个会话名称,用于监控项键值中。 示例: Plugins.Modbus.Sessions.MB1.Timeout=2 |
如果需要设置请求执行超时(即在请求完成前等待多长时间,然后将其停止),请使用 监控项配置 表单。
另请参见:
- Zabbix agent 2 常规配置参数说明: Zabbix agent 2 (UNIX) / Zabbix agent 2 (Windows)
- 配置 plugins 的说明