Skip to content

add conversion mechanism to modbus - similar to snmp plugin #7266

@orbweaver

Description

@orbweaver

Feature Request

add conversion mechanism to modbus - similar to snmp

Opening a feature request kicks off a discussion.

Proposal:

add a conversion/scaling feature to modbus data

Current behavior:

some modbus devices keep an integer value in their registers that are a multiple of the actual value
i.e. "563" in the register represents an actual value of "56.3"

Desired behavior:

use a conversion factor, similar to the snmp input plugin. sample from snmp pasted below

Apply one of the following conversions to the variable value:

##   float(X) Convert the input value into a float and divides by the
##            Xth power of 10. Effectively just moves the decimal left
##            X places. For example a value of `123` with `float(2)`
##            will result in `1.23`.
##   float:   Convert the value into a float with no adjustment. Same
##            as `float(0)`.
##   int:     Convert the value into an integer.
##   hwaddr:  Convert the value to a MAC address.
##   ipaddr:  Convert the value to an IP address.
# conversion = ""

Use case:

when collecting from diverse data sources (snmp, modbus, exec scripts,etc) it would be beneficial to have the data uniformly formatted and scaled when storing them, to help simplify

Metadata

Metadata

Assignees

Labels

area/modbusfeature requestRequests for new plugin and for new features to existing plugins

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions