-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Conversation
There was a problem hiding this 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!
Test done on PLC Siemens OPCUA server , timestamp is correctly taken from the node when source or server are selected |
There was a problem hiding this 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.
I there,
In OPC UA you can have 2 topologies ( for most )
First is the client ( telegraf ) connecting to the OPCUA server
* In such case the source et server timestamp are the same.
Second topology is having many servers sending to one server acting as proxy
* In this case the source timestamp might be different from the server ( proxy )
This is available here => https://reference.opcfoundation.org/v104/Core/docs/Part4/3.1/
The last option we have added is the gather , which in case could take the timestamp from the client ( telegraf )
I hope it helps
Kr
Jordan
De : Steven Soroka ***@***.***>
Envoyé : jeudi 18 mars 2021 20:03
À : influxdata/telegraf ***@***.***>
Cc : jordan bauduin ***@***.***Com>; Comment ***@***.***>
Objet : Re: [influxdata/telegraf] Allow user to select the source for the metric timestamp. (#9013)
@ssoroka requested changes on this pull request.
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.
_____
In plugins/inputs/opcua/README.md <#9013 (comment)> :
+ ## "gather" -- uses the time of receiving the data in telegraf
+ ## "server" -- uses the timestamp provided by the server
shouldn't gather and server be the same thing?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#9013 (review)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEECV2SEKRNHJUR3MIM33ITTEJE7TANCNFSM4ZMYBO2Q> . <https://github.com/notifications/beacon/AEECV2WNJAWWRO4WY5X5CC3TEJE7TA5CNFSM4ZMYBO22YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOESZ5XSI.gif>
|
@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? |
@jordanbauduin can you please comment on the question above. |
There was a problem hiding this 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..
@Hipska fixed. Thanks! |
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. |
Sven, could you fix the conflicts and we'll merge this? |
8f136d9
to
b43f633
Compare
Hey @reimda sorry for taking so long. Rebased and title fixed. |
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
Required for all PRs:
Closes #9011.