-
Notifications
You must be signed in to change notification settings - Fork 1.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
HTTP requests should have an User-Agent
header
#8880
Comments
endersonmaia
added a commit
to endersonmaia/fluent-bit
that referenced
this issue
May 27, 2024
5 tasks
endersonmaia
added a commit
to endersonmaia/fluent-bit
that referenced
this issue
May 27, 2024
Signed-off-by: Enderson Maia <endersonmaia@gmail.com>
Ideally, we should have a well formed User-Agent like:
And that would change based on the plugin used to make the requests. |
edsiper
pushed a commit
that referenced
this issue
May 29, 2024
Signed-off-by: Enderson Maia <endersonmaia@gmail.com>
38 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When using fluent-bit's
prometheus_scraper
input plugin , I found that the service I was trying to scrape requires the HTTP requests to have aUser-Agent
headed and responds with HTTP 418 if it doesn't.Looking into fluent-bit HTTP client conde, I found that the
User-Agent
header is only defined when inside theflb_http_client_proxy_connect()
branch.https://github.com/fluent/fluent-bit/blob/master/src/flb_http_client.c
Describe the solution you'd like
fluent-bit should send the
User-Agent
HTTP Header for all HTTP requests, or at least provide a global or per plugin configuration where the user can enable/disable theUser-Agent
Http HeaderAdditional context
As an evidence of the behavior, you could do this:
Start fluent-bit with:
On one terminal, listen at TCP port 8080, and wait for the scrape plugin:
The text was updated successfully, but these errors were encountered: