Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@andriizaiets
Copy link
Contributor

Summary

Fix String 'extra' parameter

Config:

fields = [
        {name="Line_1", address="DB68.S28.19"},
        {name="Line_2", address="DB68.S50.19"},
        {name="Line_3", address="DB68.S72.19"},
        {name="Line_4", address="DB68.S94.19"},
        {name="Line_5", address="DB68.S116.19"},
        {name="Line_6", address="DB68.S138.19"},
        {name="Line_7", address="DB68.S160.19"},
     ]

Test run:

./telegraf.exe --config ./TEST.conf --test --print-plugin-config-source
2025-08-31T08:12:04Z I! Loading config: ./TEST.conf
2025-08-31T08:12:04Z I! Starting Telegraf unknown (customized) brought to you by InfluxData the makers of InfluxDB
2025-08-31T08:12:04Z I! Available plugins: 1 inputs, 0 aggregators, 0 processors, 1 parsers, 1 outputs, 0 secret-stores
2025-08-31T08:12:04Z I! Loaded inputs: s7comm
+--------+------------+
| NAME   | SOURCE(S)  |
+--------+------------+
| s7comm | ./TEST.conf |
+--------+------------+
2025-08-31T08:12:04Z I! Loaded aggregators:
2025-08-31T08:12:04Z I! Loaded processors:
2025-08-31T08:12:04Z I! Loaded secretstores:
2025-08-31T08:12:04Z W! Outputs are not used in testing mode!
2025-08-31T08:12:04Z I! Tags enabled: host=DESKTOP-*******
2025-08-31T08:12:04Z W! [agent] The default value of 'skip_processors_after_aggregators' will change to 'true' with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to 'false'!
> TEST,host=DESKTOP-******* Line_1="Out135_In109_Route1",Line_2="",Line_3="",Line_4="",Line_5="",Line_6="",Line_7="" 1756657201000000000

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #17509

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Aug 31, 2025
@telegraf-tiger
Copy link
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

👍 This pull request doesn't change the Telegraf binary size

📦 Click here to get additional PR build artifacts

Artifact URLs

. DEB . RPM . TAR . GZ . ZIP
[[amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip] [arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip] [armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip] [armhf.deb i386.rpm freebsd_armv7.tar.gz ] [i386.deb ppc64le.rpm freebsd_i386.tar.gz ] [mips.deb riscv64.rpm linux_amd64.tar.gz ] [mipsel.deb s390x.rpm linux_arm64.tar.gz ] [ppc64el.deb x86_64.rpm linux_armel.tar.gz ] [riscv64.deb linux_armhf.tar.gz ] [s390x.deb linux_i386.tar.gz ] [ linux_mips.tar.gz ] [ linux_mipsel.tar.gz ] [ linux_ppc64le.tar.gz ] [ linux_riscv64.tar.gz ] [ linux_s390x.tar.gz ]]

@srebhan srebhan changed the title fix(inputs.s7comm): string type 'extra' parameter offset #17509 fix(inputs.s7comm): Use correct value for string length with 'extra' parameter Sep 1, 2025
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andriizaiets! I'm not fully sure I remember why we had the amout that way but it might be an oversight...

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 1, 2025
@mstrandboge mstrandboge merged commit c03ad8e into influxdata:master Sep 2, 2025
29 checks passed
@github-actions github-actions bot added this to the v1.36.0 milestone Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[inputs.s7comm] string type 'extra' parameter offset

4 participants