Áú»¢¶Ä²©

Modbus protocol

Modbus is a data communications protocol originally published by Modicon in 1979 for use with its programmable logic controllers. Modbus has become a de facto standard communication protocol and is now a commonly available means of connecting industrial electronic devices.

Dostupn¨¢ ?±ð?±ð²Ô¨ª




This template is for Áú»¢¶Ä²© version: 7.2

Source:

Modbus plugin

This plugin provides a native solution for monitoring modbus devices by Áú»¢¶Ä²©. The plugin can monitor several modbus devices simultaneously via Áú»¢¶Ä²© agent 2. Both TCP and RTU connections are supported.

Requirements

  • Áú»¢¶Ä²© Agent 2
  • Go >= 1.21 (required only to build from source)

Installation

The plugin is supplied as part of the Áú»¢¶Ä²© Agent 2 and does not require any special installation steps. Once Áú»¢¶Ä²© Agent 2 is installed, the plugin is ready to work. Now you need to make sure that a modbus device is available for connection and configure monitoring.

Configuration

Open the Áú»¢¶Ä²© Agent configuration file (zabbix_agent2.conf) and set the required parameters.

Plugins.Modbus.Timeout ¡ª request execution timeout (how long to wait for a request to complete before shutting it down).
Default value: equals the global 'Timeout' (configuration parameter set in zabbix_agent2.conf).
Limits: 1-30

Named sessions

Named sessions allow you to define specific parameters for each instance of modbus device. Currently, only three parameters are supported: Endpoint, SlaveID and Timeout (if certain parameter is not specified for a named session, a value from key will be used).

Example:
If you have two instances: "MB1" and "MB2", the following options have to be added to the agent configuration:

Plugins.Modbus.Sessions.MB1.Endpoint=tcp://127.0.0.1:502
Plugins.Modbus.Sessions.MB1.SlaveID=20
Plugins.Modbus.Sessions.MB1.Timeout=2
Plugins.Modbus.Sessions.MB2.Endpoint=rtu://com1:9600:8n1
Plugins.Modbus.Sessions.MB2.SlaveID=40
Plugins.Modbus.Sessions.MB2.Timeout=4

Now, these names can be used as connStrings in keys instead of URIs:

modbus.get[MB1]
modbus.get[MB2,,,30001,1,uint64,le,0]

Parameters priority

Áú»¢¶Ä²© checks parameters in the following order:

  1. Item key parameters (checked first).
  2. Named session parameters in configuration file (Plugins.Modbus.Sessions.<sessionName>.<parameter>). Checked only if values provided in a key parameters are empty. ¡ú

Supported keys

modbus.get[endpoint,slaveid,function,address,count,type,endianness,offset] ¡ª receive value from modbus device Params:

  • endpoint ¡ª tcp or rtu connection string. tcp://localhost:511 rtu://COM1:9600:8n1
  • slaveid ¡ª Modbus address of the device. Optional.
  • function ¡ª 1,2,3,4 modbus read functions. Optional.
  • address ¡ª Address of first registry , coil or input. Default 00001. Optional.
  • count ¡ª count of number for return. Default 1. Optional.
  • type ¡ª acceptable values: bit, int8, uint8, uint16, int16, uint32, int32, float, uint64 and double. Default bit or uint8. Optional.
  • endianness ¡ª acceptable values: be, le, mbe, mle. Optional.
  • offset ¡ª Number of registers or bits, starting from 'address', the result of which will be discarded. Optional. Returns: Array of numbers in JSON format.

Troubleshooting

The plugin uses Áú»¢¶Ä²© Agent logs. To receive more detailed information about logged events, consider increasing a debug level of Áú»¢¶Ä²© Agent.

?l¨¢nky a dokumentace

+ Navrhn¨§te nov? ?l¨¢nek

Nena?li jste integraci, kterou pot?ebujete?