diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2020-05-27 19:25:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 19:25:17 +0200 |
commit | 5a361cf67e4d7ffa64b8b451c05592d3f31ce3f9 (patch) | |
tree | 882d15983db00a97ff767282061da1ed0f823688 /controller-api | |
parent | 5cda37600281ba38b3275fef32e9ce2b1a1fa212 (diff) | |
parent | c3af22625994c04405a2675cedd5072e0dbcf0c4 (diff) |
Merge pull request #13400 from vespa-engine/jonmv/add-system-monitor
Add SystemMonitor and report to it from VersionStatusUpdater
Diffstat (limited to 'controller-api')
3 files changed, 37 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java index 6cb992dfbaf..222910d5bc6 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java @@ -16,6 +16,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.organization.Deployment import com.yahoo.vespa.hosted.controller.api.integration.organization.IssueHandler; import com.yahoo.vespa.hosted.controller.api.integration.organization.Mailer; import com.yahoo.vespa.hosted.controller.api.integration.organization.OwnershipIssues; +import com.yahoo.vespa.hosted.controller.api.integration.organization.SystemMonitor; import com.yahoo.vespa.hosted.controller.api.integration.resource.CostReportConsumer; import com.yahoo.vespa.hosted.controller.api.integration.resource.MeteringClient; import com.yahoo.vespa.hosted.controller.api.integration.routing.GlobalRoutingService; @@ -72,4 +73,7 @@ public interface ServiceRegistry { ResourceTagger resourceTagger(); ApplicationRoleService applicationRoleService(); + + SystemMonitor systemMonitor(); + } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/organization/SystemMonitor.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/organization/SystemMonitor.java new file mode 100644 index 00000000000..b8b5400f7b4 --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/organization/SystemMonitor.java @@ -0,0 +1,19 @@ +package com.yahoo.vespa.hosted.controller.api.integration.organization; + +import com.yahoo.component.Version; + +/** + * Montitors a Vespa controller and its system. + * + * @author jonmv + */ +public interface SystemMonitor { + + /** Notifies the monitor of the current system version and its confidence. */ + void reportSystemVersion(Version systemVersion, Confidence confidence); + + enum Confidence { + broken, low, normal, high; + } + +} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/DummySystemMonitor.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/DummySystemMonitor.java new file mode 100644 index 00000000000..e2e5fe9e155 --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/DummySystemMonitor.java @@ -0,0 +1,14 @@ +package com.yahoo.vespa.hosted.controller.api.integration.stubs; + +import com.yahoo.component.Version; +import com.yahoo.vespa.hosted.controller.api.integration.organization.SystemMonitor; + +/** + * @author jonmv + */ +public class DummySystemMonitor implements SystemMonitor { + + @Override + public void reportSystemVersion(Version systemVersion, Confidence confidence) { } + +} |