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

Add the ability to control the exporter webserver address used #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r0ro
Copy link

@r0ro r0ro commented Dec 16, 2024

Prior to this change, start_http_server was called without explicit addr parameter, defaulting to prometheus_client addr="0.0.0.0"

For some reason (security), one might want to use a different address (127.0.0.1 for example)

This PR optionally allows setting bind address by setting the METRICS_ADDR environment variable

For backward compatibility the default value is kept "0.0.0.0"

Prior to this change, start_http_server was called without explicit addr parameter,
defaulting to prometheus_client addr="0.0.0.0"

For some reason (security), one might want to use a different address (127.0.0.1 for example)

This PR optionally allows setting bind address by setting the METRICS_ADDR environment variable

For backward compatibility the default value is kept "0.0.0.0"
@r0ro r0ro requested a review from a team as a code owner December 16, 2024 10:58
Copy link
Contributor

@jimid27 jimid27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit otherwise lgtm!

main.py Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants