diff options
author | gjoranv <gv@oath.com> | 2018-11-01 15:32:46 +0100 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2018-11-01 15:32:46 +0100 |
commit | 2ab2803c7d9d5ba063313155eb8d0ada09aa0f0a (patch) | |
tree | feaa224d9bfc4aa988313ece4d93640b25d421d2 | |
parent | 157682c3c41644855e5ea0eae6d6c1dcbc0d4783 (diff) |
Use role instead of 'configserver' for the check id.
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java index df7055d2dc6..4b2af1b83c9 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java @@ -40,6 +40,7 @@ import java.util.regex.Pattern; import static com.yahoo.vespa.hosted.node.admin.task.util.file.FileFinder.nameMatches; import static com.yahoo.vespa.hosted.node.admin.task.util.file.FileFinder.olderThan; import static com.yahoo.vespa.hosted.node.admin.task.util.file.IOExceptionUtil.uncheck; +import static com.yahoo.vespa.hosted.node.admin.util.SecretAgentCheckConfig.nodeTypeToRole; /** * @author freva @@ -116,13 +117,13 @@ public class StorageMaintainer { if (context.nodeType() == NodeType.config || context.nodeType() == NodeType.controller) { // configserver Path configServerCheckPath = context.pathInNodeUnderVespaHome("libexec/yms/yms_check_ymonsb2"); - configs.add(new SecretAgentCheckConfig(SecretAgentCheckConfig.nodeTypeToRole(context.nodeType()), 60, configServerCheckPath, + configs.add(new SecretAgentCheckConfig(nodeTypeToRole(context.nodeType()), 60, configServerCheckPath, "-zero", "configserver") .withTags(tags)); // configserver-new Path configServerNewCheckPath = Paths.get("curl"); - configs.add(new SecretAgentCheckConfig("configserver-new", 60, configServerNewCheckPath, + configs.add(new SecretAgentCheckConfig(nodeTypeToRole(context.nodeType())+"-new", 60, configServerNewCheckPath, "-s", "localhost:19071/yamas-metrics") .withTags(tags)); @@ -163,7 +164,7 @@ public class StorageMaintainer { private Map<String, Object> generateTags(NodeAgentContext context, NodeSpec node) { Map<String, String> tags = new LinkedHashMap<>(); tags.put("namespace", "Vespa"); - tags.put("role", SecretAgentCheckConfig.nodeTypeToRole(node.getNodeType())); + tags.put("role", nodeTypeToRole(node.getNodeType())); tags.put("zone", String.format("%s.%s", context.zoneId().environment().value(), context.zoneId().regionName().value())); node.getVespaVersion().ifPresent(version -> tags.put("vespaVersion", version)); |