mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	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;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        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(),
 | 
			
		||||
                alertMessage, alertMessage);
 | 
			
		||||
        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);
 | 
			
		||||
            if (i == 0) {
 | 
			
		||||
                failingChecksEvent.append("Router ")
 | 
			
		||||
                        .append(router.getName())
 | 
			
		||||
                        .append(" / ")
 | 
			
		||||
                        .append(router.getUuid())
 | 
			
		||||
                        .append(" has failing checks: ");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user