From 4cd8bd3096e375f476996d88dff620d8454ae791 Mon Sep 17 00:00:00 2001 From: junwen12221 Date: Fri, 18 Feb 2022 21:18:17 +0800 Subject: [PATCH] fix PrometheusExporter always start --- mycat2/src/main/java/io/mycat/exporter/PrometheusExporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mycat2/src/main/java/io/mycat/exporter/PrometheusExporter.java b/mycat2/src/main/java/io/mycat/exporter/PrometheusExporter.java index a380fe6f9..315265a87 100644 --- a/mycat2/src/main/java/io/mycat/exporter/PrometheusExporter.java +++ b/mycat2/src/main/java/io/mycat/exporter/PrometheusExporter.java @@ -16,7 +16,7 @@ public class PrometheusExporter implements Runnable { @Override public void run() { MycatServerConfig mycatServerConfig = MetaClusterCurrent.wrapper(MycatServerConfig.class); - Optional.ofNullable(mycatServerConfig.getProperties().getOrDefault("prometheusPort",7066)) + Optional.ofNullable(mycatServerConfig.getProperties().getOrDefault("prometheusPort",null)) .ifPresent(port->{ try { CollectorList collectorList = new CollectorList(