Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

start_http_server dual stack and IPv6 literals #791

Copy link
Copy link
Closed
@baryluk

Description

@baryluk
Issue body actions

Version 0.13.1

Python 3.9.11 on Debian testing.

I saw #567 , but this is still broken.

prometheus_client.start_http_server(port=9888, addr="localhost") - only listens on IPv4

prometheus_client.start_http_server(port=9888, addr="::") - doesn't work

prometheus_client.start_http_server(port=9888, addr="::1") - doesn't work

prometheus_client.start_http_server(port=9888, addr="[::]") - doesn't work

Optimally, it should be configurable using a single parameter, because it is easier to pass things from command line using a single parameter, than parsing it manually in every program that requires it:

--listen=:9888 for example, to listen on 0.0.0.0 and ::.
--listen=localhost:9888 for example, to listen on 127.0.0.1 and ::1.
--listen=[::1]:9888 for example, to listen on ::1.
--listen=127.0.0.1:9888 for example, to listen on 127.0.0.1.

Ability to bind to interface would also be nice. (i.e. --listen=10.0.0.1:9888@eth1)

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.