We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[[inputs.http]] ## One or more URLs from which to read formatted metrics. urls = [ "https://xxxxxx", ] token_file = "/tmp/bearer_token_file"
docker-telegraf-1 | 2023-11-27T14:00:00Z E! [inputs.http] Error in plugin: [url=https://xxxxxx]: open : no such file or directory
Telegraf 1.28.5
FROM telegraf:latest
token_file
...
http input plugin should open the file containing the bearer token
error which says that file cannot be opened.
I think it's part in http.go:
} else if h.TokenFile != "" { token, err := os.ReadFile(h.BearerToken)
} else if h.TokenFile != "" {
token, err := os.ReadFile(h.BearerToken)
I.e. it tries to open file given in the deprecated bearer_token
bearer_token
The text was updated successfully, but these errors were encountered:
fix(inputs.http): Use correct token variable
032e76f
fixes: influxdata#14347
Thank you for taking the time to file and issue and even find the root cause. I have put up #14350 with a fix.
Sorry, something went wrong.
fix(inputs.http): Use correct token variable (#14350)
7b5393c
fixes: #14347
Successfully merging a pull request may close this issue.
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.28.5
Docker
FROM telegraf:latest
Steps to reproduce
token_file
...
Expected behavior
http input plugin should open the file containing the bearer token
Actual behavior
error which says that file cannot be opened.
Additional info
I think it's part in http.go:
} else if h.TokenFile != "" {
token, err := os.ReadFile(h.BearerToken)
I.e. it tries to open file given in the deprecated
bearer_token
The text was updated successfully, but these errors were encountered: