+ /**
+ * Sends GET operation to DMI plugin's health check URL.
+ *
+ * @param dmiPluginBaseUrl the base URL of the dmi-plugin
+ * @return DmiPluginStatus as UP or DOWN
+ */
+ public DmiPluginStatus getDmiPluginStatus(final String dmiPluginBaseUrl) {
+ try {
+ final HttpEntity<Object> httpHeaders = new HttpEntity<>(configureHttpHeaders(new HttpHeaders()));
+ final JsonNode dmiPluginHealthStatus = restTemplate.getForObject(dmiPluginBaseUrl + "/manage/health",
+ JsonNode.class, httpHeaders);
+ if (dmiPluginHealthStatus != null) {
+ if (dmiPluginHealthStatus.get("status").asText().equals("UP")) {
+ return DmiPluginStatus.UP;
+ }
+ }
+ } catch (final Exception exception) {
+ log.warn("Could not send request for health check since {}", exception.getMessage());
+ }
+ return DmiPluginStatus.DOWN;
+ }
+