Special-case the default bind_addresses for metrics listener

turns out it doesn't really support ipv6, so let's hack around that by only
listening on ipv4 by default.
This commit is contained in:
Richard van der Hoff 2019-02-13 11:48:56 +00:00
parent 19818d66af
commit e3a0300431
2 changed files with 7 additions and 4 deletions

View file

@ -153,9 +153,8 @@ def listen_metrics(bind_addresses, port):
from prometheus_client import start_http_server
for host in bind_addresses:
reactor.callInThread(start_http_server, int(port),
addr=host, registry=RegistryProxy)
logger.info("Metrics now reporting on %s:%d", host, port)
logger.info("Starting metrics listener on %s:%d", host, port)
start_http_server(port, addr=host, registry=RegistryProxy)
def listen_tcp(bind_addresses, port, factory, reactor=reactor, backlog=50):