void define(WebService.NewController controller, SystemWsAction handler) {
controller.createAction("health")
.setDescription("Provide health status of SonarQube." +
- "<p>Require 'Administer System' permission or authentication with passcode</p>" +
+ "<p>Although global health is calculated based on both application and search nodes, detailed information is returned only for application nodes.</p>" +
"<p> " +
" <ul>" +
" <li>GREEN: SonarQube is fully operational</li>" +
"message": "bar"
}
]
- },
- {
- "name": "es-1",
- "type": "SEARCH",
- "host": "192.168.1.3",
- "port": 999,
- "startedAt": "2015-08-13T23:34:59+0200",
- "health": "GREEN",
- "causes": []
- },
- {
- "name": "es-2",
- "type": "SEARCH",
- "host": "192.168.1.4",
- "port": 999,
- "startedAt": "2015-08-13T23:34:59+0200",
- "health": "GREEN",
- "causes": []
- },
- {
- "name": "es-3",
- "type": "SEARCH",
- "host": "192.168.1.5",
- "port": 999,
- "startedAt": "2015-08-13T23:34:59+0200",
- "health": "GREEN",
- "causes": []
}
]
}
.setPort(999)
.setStartedAt(time)
.build())
- .build(),
- newNodeHealthBuilder()
- .setStatus(NodeHealth.Status.GREEN)
- .setDetails(
- newNodeDetailsBuilder()
- .setName("es-1")
- .setType(NodeDetails.Type.SEARCH)
- .setHost("192.168.1.3")
- .setPort(999)
- .setStartedAt(time)
- .build())
- .build(),
- newNodeHealthBuilder()
- .setStatus(NodeHealth.Status.GREEN)
- .setDetails(
- newNodeDetailsBuilder()
- .setName("es-2")
- .setType(NodeDetails.Type.SEARCH)
- .setHost("192.168.1.4")
- .setPort(999)
- .setStartedAt(time)
- .build())
- .build(),
- newNodeHealthBuilder()
- .setStatus(NodeHealth.Status.GREEN)
- .setDetails(
- newNodeDetailsBuilder()
- .setName("es-3")
- .setType(NodeDetails.Type.SEARCH)
- .setHost("192.168.1.5")
- .setPort(999)
- .setStartedAt(time)
- .build())
.build())));
TestResponse response = underTest.newRequest().execute();