Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inputs.opcua): add use regular reads workaround #11630

Merged
merged 6 commits into from
Sep 26, 2022

Conversation

R290
Copy link
Contributor

@R290 R290 commented Aug 7, 2022

Required for all PRs

resolves #11559

Added workaround to use regular reads instead of registered reads.

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Aug 7, 2022
@Hipska Hipska changed the title feat: add use regular reads workaround to inputs.opcua feat(inputs.opcua): add use regular reads workaround Sep 13, 2022
@Hipska Hipska added area/opcua plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Sep 13, 2022
plugins/inputs/opcua/README.md Show resolved Hide resolved
plugins/inputs/opcua/opcua.go Outdated Show resolved Hide resolved
plugins/inputs/opcua/sample.conf Outdated Show resolved Hide resolved
@Hipska Hipska requested a review from srebhan September 13, 2022 08:12
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
@Hipska
Copy link
Contributor

Hipska commented Sep 14, 2022

Have also a look at the test-go-linux check and fix the issues that come from it.
You can also run this on your local machine before pushing, see Unit Tests section.

@R290
Copy link
Contributor Author

R290 commented Sep 14, 2022

Good point on the make docs. I accepted your changes from within GitHub, so I didn't run any checks before committing. For some reason make check wants me to change 375 files (including opcua.go) using make fmt...

@telegraf-tiger
Copy link
Contributor

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

🥳 This pull request decreases the Telegraf binary size by -2.72 % for linux amd64 (new size: 148.5 MB, nightly size 152.6 MB)

📦 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_i386.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz
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
static_linux_amd64.tar.gz

@powersj
Copy link
Contributor

powersj commented Sep 21, 2022

@R290 is this one ready to review or was there additional development required? Thanks!

@powersj powersj added the waiting for response waiting for response from contributor label Sep 21, 2022
@R290
Copy link
Contributor Author

R290 commented Sep 26, 2022

The attached issue contains of 2 parts, and this pull only resolves the second part:
telegraf needs to handle auto-reconnect and that we should reconsider using registered reads
For the first part some issues within the underlying opcua library need to be fixed, but this has been eerily quiet for the past six weeks or so. Feel free to review and merge though, the changes are only a small workaround.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Sep 26, 2022
@powersj powersj marked this pull request as ready for review September 26, 2022 17:29
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for putting this up. fwiw I think I held off earlier because this was marked draft.

@powersj powersj 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 26, 2022
@MyaLongmire MyaLongmire merged commit c78139c into influxdata:master Sep 26, 2022
@LarsStegman
Copy link
Contributor

LarsStegman commented Sep 27, 2022

I know this has already been merged, but it has not yet been released. Might I suggest using use_unregistered_reads as the config name. I think regular could be confusing.

@MyaLongmire
Copy link
Contributor

@LarsStegman that's a great idea! Are you willing to put up a pr or should i?

@LarsStegman
Copy link
Contributor

You can do it if you want 🙂

@MyaLongmire
Copy link
Contributor

@LarsStegman pr can be found here :)

dba-leshop pushed a commit to dba-leshop/telegraf that referenced this pull request Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/opcua feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin 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.

Support opcua auto-reconnect and don't use registered reads
5 participants