Skip to content

Commit

Permalink
fix PrometheusExporter always start
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen12221 committed Feb 18, 2022
1 parent 6995421 commit 4cd8bd3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4cd8bd3

Please sign in to comment.