diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-01-31 14:32:38 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-01-31 14:32:38 +0100 |
commit | 166b1d959dbea3f3dec5ad26ad60c1c59e2bea85 (patch) | |
tree | 3a62c132a78b46f7054845bb13d100750087f18e /service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java | |
parent | 2f05c797b69f0a261a347d769301a856a117170b (diff) |
Health rest API
Makes a new REST API /orchestrator/v1/health/<ApplicationId> that shows the
list of services that are monitored for health. This information is currently a
bit difficult to infer from
/orchestrator/v1/instances/<ApplicationInstanceReference> since it is the
combined view of health and Slobrok. There are already APIs for Slobrok.
Example content:
$ curl -s localhost:19071/orchestrator/v1/health/hosted-vespa:zone-config-serve\
rs:default|jq .
{
"services": [
{
"clusterId": "zone-config-servers",
"serviceType": "configserver",
"configId": "zone-config-servers/cfg6",
"status": {
"serviceStatus": "UP",
"lastChecked": 1548939111.708718,
"since": 1548939051.686223,
"endpoint": "http://cfg4.prod.cd-us-central-1.vespahosted.ne1.yahoo.com:19071/state/v1/health"
}
},
...
]
}
This view is slightly different from the application model view, just because
that's exactly how the health monitoring is structured (individual monitors
against endpoints).
The "endpoint" information will also be added to /instances if the status comes
from health and not Slobrok.
Diffstat (limited to 'service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java')
-rw-r--r-- | service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java b/service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java index 533e5173ccc..e3fb7d08d93 100644 --- a/service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java +++ b/service-monitor/src/test/java/com/yahoo/vespa/service/health/StateV1HealthMonitorTest.java @@ -17,7 +17,7 @@ public class StateV1HealthMonitorTest { public void downThenUpThenDown() throws Exception { StateV1HealthClient client = mock(StateV1HealthClient.class); - StateV1HealthUpdater updater = new StateV1HealthUpdater(client); + StateV1HealthUpdater updater = new StateV1HealthUpdater("https://foo/state/v1/health", client); RunletExecutor executor = new RunletExecutorImpl(2); try (StateV1HealthMonitor monitor = new StateV1HealthMonitor(updater, executor, Duration.ofMillis(10))) { assertEquals(ServiceStatus.NOT_CHECKED, monitor.getStatus().serviceStatus()); |