use of io.hops.hopsworks.alerting.api.alert.dto.AlertmanagerStatus in project hopsworks by logicalclocks.
the class AlertManager method getStatus.
public AlertmanagerStatus getStatus() throws AlertManagerResponseException, AlertManagerClientCreateException, AlertManagerUnreachableException {
doClientSanityCheck();
try {
AlertmanagerStatus response = client.getStatus();
registerSuccess();
return response;
} catch (AlertManagerServerException e) {
registerServerError();
throw new AlertManagerUnreachableException("Alertmanager not reachable." + e.getMessage(), e);
}
}
use of io.hops.hopsworks.alerting.api.alert.dto.AlertmanagerStatus in project hopsworks by logicalclocks.
the class AlertManagerClient method getStatus.
public AlertmanagerStatus getStatus() throws AlertManagerResponseException, AlertManagerServerException {
WebTarget wt = webTarget.path(Settings.ALERTS_API_STATUS);
LOGGER.log(Level.FINE, "Sending request getStatus to: {0}", wt.toString());
AlertmanagerStatus alertmanagerStatus = getResponse(sendRequest(wt.request(MediaType.APPLICATION_JSON), RequestMethod.GET, null), AlertmanagerStatus.class);
return alertmanagerStatus;
}
Aggregations