diff --git a/dbms/src/Server/MetricsPrometheus.cpp b/dbms/src/Server/MetricsPrometheus.cpp index 2a1c1bae42d..c3248632e84 100644 --- a/dbms/src/Server/MetricsPrometheus.cpp +++ b/dbms/src/Server/MetricsPrometheus.cpp @@ -59,8 +59,17 @@ std::string getInstanceValue(const Poco::Util::AbstractConfiguration & conf) auto service_addr = conf.getString("flash.service_addr"); if (service_addr.empty()) return getHostName(); - // "0.0.0.0", "127.x.x.x", "locallhost", "0:0:0:0:0:0:0:0", "0:0:0:0:0:0:0:1", "::", "::1", ":${port}" - static const std::vector blacklist{"0.0.0.0", "127.", "locallhost", "0:0:0:0:0:0:0", ":"}; + // "0.0.0.0", "127.x.x.x", "localhost", "0:0:0:0:0:0:0:0", "0:0:0:0:0:0:0:1", "::", "::1", ":${port}" + static const std::vector blacklist{ + // ivp4 + "0.0.0.0", + "127.", + "localhost", + // ipv6 + "0:0:0:0:0:0:0", + "[0:0:0:0:0:0:0", + ":", + "[:"}; for (const auto & prefix : blacklist) { if (startsWith(service_addr, prefix)) diff --git a/etc/config-template.toml b/etc/config-template.toml index 0c89597c5bf..ad13fca53d0 100644 --- a/etc/config-template.toml +++ b/etc/config-template.toml @@ -122,6 +122,10 @@ # advertise-status-addr = "tiflash0:20292" # engine-addr = "tiflash0:3930" +# [cluster] +# Used to specify which cluster the tiflash compute node belongs to. +# cluster_id = "${cluster_id}" + [logger] # log = "/tmp/tiflash/log/server.log" # level = "debug"