Use IP address for prometheus.

This commit is contained in:
fortuna 2018-12-19 10:31:37 -05:00
parent 3bd8d2a89d
commit 73fff76637

View file

@ -138,7 +138,9 @@ async function main() {
logging.info('Starting...');
const prometheusPort = await portProvider.reserveFirstFreePort(9090);
const prometheusLocation = `localhost:${prometheusPort}`;
// Use 127.0.0.1 instead of localhost for Prometheus because it's resolving incorrectly for some users.
// See https://github.com/Jigsaw-Code/outline-server/issues/341
const prometheusLocation = `127.0.0.1:${prometheusPort}`;
const nodeMetricsPort = await portProvider.reserveFirstFreePort(prometheusPort + 1);
exportPrometheusMetrics(prometheus.register, nodeMetricsPort);