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

Automatically enable --web.systemd-socket when $LISTEN_FDS is set #225

Open
septatrix opened this issue Jun 26, 2024 · 0 comments
Open

Automatically enable --web.systemd-socket when $LISTEN_FDS is set #225

septatrix opened this issue Jun 26, 2024 · 0 comments

Comments

@septatrix
Copy link

Almost two years ago (#95) exporter-toolkit added the --web.systemd-socket flag to listen on a pre-opened socket passed as a file descriptor. We have used this feature with success since then. However, having to manually set the flag when using a socket is quite cumbersome and error prone. Additionally, when the flag is set, exporters fail to start unless a socket is passed. This is a reasonable behavior as one explicitly told the exporter to use an existing socket.

However, it would be better to check the $LISTEN_FDS environment variable and automatically use a socket if that variable is set. If that variable is not set, the exporter would fall back to opening a port on its own.

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

1 participant