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: Allow user to select the source for the metric timestamp. #9013

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Mar 18, 2021

Required for all PRs:

  • Associated README.md updated.
  • Has appropriate unit tests.

Closes #9011.

Copy link
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

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

🤝 ✅ CLA has been signed. Thank you!

@jordanbauduin
Copy link

Test done on PLC Siemens OPCUA server , timestamp is correctly taken from the node when source or server are selected
thx for fixing it so fast !

@srebhan srebhan added area/opcua feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Mar 18, 2021
Copy link
Contributor

@ssoroka ssoroka left a comment

Choose a reason for hiding this comment

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

this is a common ask across a lot of plugins. I kind of feel like it shouldn't go into a single plugin. I was considering making a plugin for it, but with the new Starlark time support, I'm not sure it's needed.

Seems like the fix for the original issue is that it should always use the timestamp from the source.

plugins/inputs/opcua/README.md Outdated Show resolved Hide resolved
@jordanbauduin
Copy link

jordanbauduin commented Mar 18, 2021 via email

@srebhan srebhan requested a review from ssoroka April 19, 2021 10:13
@reimda
Copy link
Contributor

reimda commented Apr 21, 2021

@jordanbauduin Is a single plugin-level setting sufficient? I wonder if people will want some nodes (or groups) to use one timestamp and other nodes/groups to use a different timestamp.

For example suppose you have many servers feeding a proxy server. You might want to use the timestamp from the feeding server if it's accurate, but if the feeding server's timestamp isn't accurate (maybe no real time clock or ntpd) you would want the timestamp from the proxy server.

Is this a useful design or more flexibility than anyone would ever need?

@srebhan
Copy link
Member Author

srebhan commented Jun 15, 2021

@jordanbauduin can you please comment on the question above.

Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

Approved, there is only a small linter check of an empty line that can be fixed..

@srebhan
Copy link
Member Author

srebhan commented Jun 28, 2021

@Hipska fixed. Thanks!

@reimda reimda removed the request for review from ssoroka September 24, 2021 20:25
@reimda
Copy link
Contributor

reimda commented Sep 24, 2021

I'm ok taking this PR as it is. I still wonder if people will need more flexibility and want to choose the source for each group or node, but that shouldn't prevent us from starting with a single setting at the plugin level. If users ask for more flexibility we can revisit adding a timestamp setting to groups or nodes.

@reimda
Copy link
Contributor

reimda commented Sep 24, 2021

Sven, could you fix the conflicts and we'll merge this?

@srebhan srebhan changed the title Allow user to select the source for the metric timestamp. feat: Allow user to select the source for the metric timestamp. Sep 28, 2021
@srebhan
Copy link
Member Author

srebhan commented Sep 28, 2021

Hey @reimda sorry for taking so long. Rebased and title fixed.

@reimda reimda merged commit c4d2ad8 into influxdata:master Sep 28, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegraf OPCUA input doesn't report OPCUA server timestamps
6 participants