diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-05-27 14:40:20 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-05-27 14:40:20 +0200 |
commit | 4b8bcc0d3ff5d849cf69df80274378b11fc79c35 (patch) | |
tree | ec08280f7021d239a8054fea5cdfa3839999d5ac /controller-api | |
parent | b008456b593bb6c852d3cf41baf150e844728c20 (diff) |
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 007ab2b4abe..a906e821920 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 @@ -17,6 +17,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; @@ -75,4 +76,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) { } + +} |