You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by nv...@apache.org on 2022/03/21 02:44:29 UTC

[cloudstack] branch main updated: Router health check notification mail to show router name next to UUID (#6130)

This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 13efa59  Router health check notification mail to show router name next to UUID (#6130)
13efa59 is described below

commit 13efa590979408893076274cd79f574c917d09c0
Author: dahn <da...@shapeblue.com>
AuthorDate: Mon Mar 21 03:44:06 2022 +0100

    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 <da...@onecht.net>
---
 .../com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 2aecafd..e561acc 100644
--- a/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -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: ");
             }