Skip to content

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

@septatrix

Description

@septatrix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions