diff options
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/Logd.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/Logd.java b/config-model/src/main/java/com/yahoo/vespa/model/Logd.java index f15c60ca3c0..0f7418582a3 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/Logd.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/Logd.java @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model; +import com.yahoo.cloud.config.log.LogdConfig; + /** * There is one logd running on each Vespa host, and one instance of * this class is therefore created by each instance of class {@link @@ -8,7 +10,10 @@ package com.yahoo.vespa.model; * * @author gjoranv */ -public class Logd extends AbstractService { +public class Logd + extends AbstractService + implements LogdConfig.Producer +{ /** * Creates a new Logd instance. @@ -17,18 +22,28 @@ public class Logd extends AbstractService { super(host, "logd"); setProp("clustertype", "hosts"); setProp("clustername", "admin"); + portsMeta.on(0).tag("http").tag("state"); } /** - * Logd does not need any ports. + * Logd needs a state port. * * @return The number of ports reserved by the logd */ - public int getPortCount() { return 0; } + public int getPortCount() { return 1; } + + /** Returns the desired base port for this service. */ + public int getWantedPort() { return 19089; } - /** + /** * @return The command used to start logd */ public String getStartupCommand() { return "exec sbin/vespa-logd"; } + @Override + public int getHealthPort() { return getRelativePort(0); } + + public void getConfig(LogdConfig.Builder builder) { + builder.stateport(getHealthPort()); + } } |