Skip to content
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

Set User-Agent to something more meaningful #185

Closed
theS1LV3R opened this issue Jan 3, 2024 · 2 comments
Closed

Set User-Agent to something more meaningful #185

theS1LV3R opened this issue Jan 3, 2024 · 2 comments

Comments

@theS1LV3R
Copy link
Contributor

At the moment Apache exporter uses the default Go HTTP User-Agent (Go-http-client/1.1), spamming HTTP request logs with the following:

::1 - - [03/Jan/2024:09:44:01 +0100] "GET /server-status?auto HTTP/1.1" 403 6865 "-" "Go-http-client/1.1"
::1 - - [03/Jan/2024:09:45:31 +0100] "GET /server-status?auto HTTP/1.1" 403 6865 "-" "Go-http-client/1.1"
::1 - - [03/Jan/2024:09:47:01 +0100] "GET /server-status?auto HTTP/1.1" 403 6865 "-" "Go-http-client/1.1"
::1 - - [03/Jan/2024:09:48:31 +0100] "GET /server-status?auto HTTP/1.1" 403 6865 "-" "Go-http-client/1.1"
::1 - - [03/Jan/2024:09:50:01 +0100] "GET /server-status?auto HTTP/1.1" 403 6865 "-" "Go-http-client/1.1"

Is it possible to change the User-Agent that is used, like Prometheus did a while ago? I suggest using something like Apache-Exporter/<version>, in the same way they did: https://github.com/prometheus/prometheus/pull/2447/files

@blkperl
Copy link
Collaborator

blkperl commented Jan 10, 2024

@theS1LV3R sounds good to me, would you like to submit a PR?

theS1LV3R added a commit to theS1LV3R/apache_exporter that referenced this issue Jan 10, 2024
Set to format: Prometheus-Apache-Exporter/%s
blkperl pushed a commit that referenced this issue Jan 30, 2024
Set to format: Prometheus-Apache-Exporter/%s
@blkperl
Copy link
Collaborator

blkperl commented Jan 30, 2024

Thanks @theS1LV3R for the contribution!

@blkperl blkperl closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants