feat: Add caching to internet_speed#10530
feat: Add caching to internet_speed#10530sspaink merged 14 commits intoinfluxdata:masterfrom Jleagle:master
Conversation
|
Thanks so much for the pull request! |
|
!signed-cla |
srebhan
left a comment
There was a problem hiding this comment.
Thanks for this PR @Jleagle. I have some comments in the code. However, there is a more general comment regarding the offset. I think this should be a Telegraf-wide option to allow an offset to the rounded gather interval globally and plugin-wise. So I'm setting the corresponding tag to make Influx people take a look.
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
srebhan
left a comment
There was a problem hiding this comment.
Very nice @Jleagle. There is only one offset left-over in the readme, but other than that we are fine to go I think.
Just one more request: If the collection_offset worked for you, please drop a note in the corresponding PR. Thanks for your effort!
|
📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
|
I'm a bit late to the party, but now the selected server is used for the whole duration of telegraf run. I can imagine after a few days that server is not available and another one should be picked. Could someone implement server re-election and/or cache expiry (Duration)? |
|
I think re-electing the server on error is a valid point. |
Required for all PRs:
This PR adds two config options, offset & cache.
Offset is to help spread the calls to the speedtest server, this also reduces errors that seem to happen at specific times like on the hour, presumably where everyone does a test at the same time.
Cache caches the closest speedtest server, there doesn't seem to be much point in querying all the servers to get the closest one when it's going to be the same every time.
They both default to false to help with backwards compatibility.