Skip to content

inputs.modbus: Read register span in one go and drop unused fields #12222

@LarsStegman

Description

@LarsStegman

Use Case

We currently only need a (big) subset from one of our edge devices, but this results in Telegraf sending about 200 read requests which takes about 4 seconds. The subsets are not completely contiguous in the address space, but the gaps in between the blocks are only about 1-4 registers. If we manually fill these gaps with "Spare" fields the performance increase significantly to 150ms.

We then manually drop the Spare* fields.

Expected behavior

Telegraf sends one big read request for the entire configured register span and drops the unused fields.

Actual behavior

Separate read requests are sent for every contiguous register block, which slows down performance a lot.

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature 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