-
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
docs: Add URL config behavior spec #15321
Conversation
Looks good. A little bit of bike-shedding...
Given that it's to be used as a opaque token, the
Does |
What happens if the endpoint which is trying to watch is down/timeout? Is it possible to by default keep the last successful configuration pulled or even add a flag/option to work in this way? |
When I looked into this I originally was going to use the ETag, but fewer servers seem to provide this. It seemed that Last-Modified was more readily available.
Hmm I was unaware of this, nothing in a HEAD request can be used to determine if a change was made. Let me follow-up with some internal folks about this scenario. $ curl --head https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/telegrafs/0d021699ba828000
HTTP/2 401
date: Wed, 08 May 2024 13:21:12 GMT
content-type: application/json; charset=utf-8
content-length: 55
trace-id: b7a75074a7235df0
trace-sampled: false
x-platform-error-code: unauthorized
strict-transport-security: max-age=31536000; includeSubDomains
x-influxdb-request-id: 0b69a959f18838135d84f703393bb60d
x-influxdb-build: Cloud
My intention was that
When loading the config the initial time at start, the agent would try Once Telegraf is up and running, if the user has set
Are you asking to keep the remotely collected config locally and load from that at a restart? That level of config management is out of scope for Telegraf. |
No @powersj, since any response other than a 2xx will keep Telegraf up and running with the previous successful config pulled, you have answered my request 🙏 |
Is this something that may be worth checking for both headers? |
Possibly. In general, I found that if someone is actually taking the time to set the etag then last updated was also set. |
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.
@powersj thanks for the spec, just two comments from my side...
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.
Thanks @powersj!
(cherry picked from commit 6550d4d)
Summary
Introduce a new spec to define URL-based config behavior.
Checklist