tuteng commented on a change in pull request #306: URL: https://github.com/apache/pulsar-manager/pull/306#discussion_r444873729
########## File path: src/main/java/org/apache/pulsar/manager/service/impl/BrokerStatsServiceImpl.java ########## @@ -131,7 +132,26 @@ private void scheduleCollectStats() { clusterLists.forEach((clusterMap) -> { String cluster = (String) clusterMap.get("cluster"); Pair<String, String> envCluster = Pair.of(env.getName(), cluster); - collectStatsServiceUrls.put(envCluster, (String) clusterMap.get("serviceUrl")); + String webServiceUrl = (String) clusterMap.get("serviceUrl"); + if (webServiceUrl.contains(",")) { + String[] webServiceUrlList = webServiceUrl.split(","); + if (StringUtils.isNotBlank(pulsarJwtToken)) { + header.put("Authorization", String.format("Bearer %s", pulsarJwtToken)); + } + for (String url : webServiceUrlList) { + if (!url.contains("http://")) { + url = "http://" + url; + } + String httpTestResult = HttpUtil.doGet( url + "/metrics", header); Review comment: @eolivelli I changed the interface to call health check, but it still needs several HTTP calls. I haven't found a way to get all the broker status at once. Now, this call is in a scheduled task, and it will run every 5 minutes. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org