-
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
prometheus input plugin: mistaken delete #9408
Comments
Hi @wujianhanshu, is this causing telegraf to fail? Could you give more detail about what happens when you run v1.19.0? @sspaink Could you look into why this |
@reimda The new client used in the library "kubernetes/client-go" didn't have have an equivalent to the HTTP client field that the old @wujianhanshu is the request to update the cadvisor pod list not working for you? |
@sspaink
httpClient := http.Client{} In the above code, there is no correct header information. |
@gracewehner could you perhaps help with this issue? Reaching out because you helped contribute the feature to support listing from cadvisor originally (#8762), and I don't have a good way to test this. It does seem the code is now missing the step to set the header properly like it did with the old library (link to old way), but it looks like the new kubernetes library it might be the right way to use this Pods list function. but it isn't obvious, I could try to submit a pull request with a best effort but would take sometime for me to figure out how to test it properly. Maybe @wujianhanshu or @gracewehner you have a recommendation for an easy way to recreate an environment that uses this feature? Thanks! |
This fixes it #9497 |
@wujianhanshu can you confirm that #9497 fixes the problem? |
he fixed the problem,it was excellent. @srebhan |
Relevant telegraf.conf:
Mistaken info:
Telegraf: v1.8.3-v1.19.0
https://github.com/influxdata/telegraf/pull/8937/files#diff-dcebbfefbef8e986af6172ea7f96ab8b6d0b62aac383a7fa3f7bc1df5d06f2e0
func (p *Prometheus) cAdvisor(ctx context.Context) error {
...
client.SetHeaders(req.Header) // mistaken delete
...
}
The text was updated successfully, but these errors were encountered: