diff options
author | Ola Aunrønning <olaa@oath.com> | 2019-05-13 18:02:09 +0200 |
---|---|---|
committer | Ola Aunrønning <olaa@oath.com> | 2019-05-13 18:02:09 +0200 |
commit | f3c1f8152e7ef6bf4bce8c31797518af1a59a7a1 (patch) | |
tree | 13adb92b77e5a9da25e5f0c1cd9891e2147c42b0 | |
parent | 04fe6e57621b51e30ad8ca38c4071c44982afd0f (diff) |
Ignore logserver host
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java index ca13008264f..4268782b446 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java @@ -762,11 +762,11 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye Application application = getApplication(applicationId); Map<String, List<URI>> clusterHosts = new HashMap<>(); application.getModel().getHosts().stream() - .filter(host -> host.getServices().stream().anyMatch(serviceInfo -> serviceInfo.getProperty("clustertype").isPresent())) + .filter(host -> host.getServices().stream().noneMatch(serviceInfo -> serviceInfo.getServiceType().equalsIgnoreCase("logserver"))) .forEach(hostInfo -> { ServiceInfo serviceInfo = hostInfo.getServices().stream().filter(service -> METRICS_PROXY_CONTAINER.serviceName.equals(service.getServiceType())) .findFirst().orElseThrow(() -> new IllegalArgumentException("Unable to find services " + METRICS_PROXY_CONTAINER.serviceName.toString())); - String clusterName = serviceInfo.getProperty("clusterinfo").orElse(""); + String clusterName = serviceInfo.getProperty("clusterid").orElse(""); URI host = URI.create("http://" + hostInfo.getHostname() + ":" + servicePort(serviceInfo) + "/metrics/v1/values"); clusterHosts.computeIfAbsent(clusterName, l -> new ArrayList<URI>()).add(host); } |