mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
alert: Send alert for ha'ed vm's (#5664)
* alert: Send alert for ha'ed vm's When ha is performed on vm's send the alert for it so that its for admins to know which vm's got ha'ed else its time consuming to get those details from logs * feedback change Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
This commit is contained in:
parent
3fc31ca1e5
commit
6f3c18f3a7
@ -608,7 +608,10 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements Configur
|
||||
|
||||
VMInstanceVO started = _instanceDao.findById(vm.getId());
|
||||
if (started != null && started.getState() == VirtualMachine.State.Running) {
|
||||
s_logger.info("VM is now restarted: " + vmId + " on " + started.getHostId());
|
||||
String message = String.format("HA starting VM: %s (%s)", started.getHostName(), started.getInstanceName());
|
||||
HostVO hostVmHasStarted = _hostDao.findById(started.getHostId());
|
||||
s_logger.info(String.format("HA is now restarting %s on %s", started, hostVmHasStarted));
|
||||
_alertMgr.sendAlert(alertType, vm.getDataCenterId(), vm.getPodIdToDeployIn(), message, message);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user