mirror of https://github.com/apache/cloudstack.git
Router health check notification mail to show router name next to UUID (#6130)
* alerrt message altered * review feedback and format Co-authored-by: Daan Hoogland <dahn@onecht.net>
This commit is contained in:
parent
3e4e417389
commit
13efa59097
|
|
@ -1215,7 +1215,7 @@ Configurable, StateListener<VirtualMachine.State, VirtualMachine.Event, VirtualM
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String alertMessage = "Health checks failed: " + failingChecks.size() + " failing checks on router " + router.getUuid();
|
String alertMessage = String.format("Health checks failed: %d failing checks on router %s / %s", failingChecks.size(), router.getName(), router.getUuid());
|
||||||
_alertMgr.sendAlert(AlertType.ALERT_TYPE_DOMAIN_ROUTER, router.getDataCenterId(), router.getPodIdToDeployIn(),
|
_alertMgr.sendAlert(AlertType.ALERT_TYPE_DOMAIN_ROUTER, router.getDataCenterId(), router.getPodIdToDeployIn(),
|
||||||
alertMessage, alertMessage);
|
alertMessage, alertMessage);
|
||||||
s_logger.warn(alertMessage + ". Checking failed health checks to see if router needs recreate");
|
s_logger.warn(alertMessage + ". Checking failed health checks to see if router needs recreate");
|
||||||
|
|
@ -1227,6 +1227,8 @@ Configurable, StateListener<VirtualMachine.State, VirtualMachine.Event, VirtualM
|
||||||
String failedCheck = failingChecks.get(i);
|
String failedCheck = failingChecks.get(i);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
failingChecksEvent.append("Router ")
|
failingChecksEvent.append("Router ")
|
||||||
|
.append(router.getName())
|
||||||
|
.append(" / ")
|
||||||
.append(router.getUuid())
|
.append(router.getUuid())
|
||||||
.append(" has failing checks: ");
|
.append(" has failing checks: ");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue