hertzbeat-manager/src/main/resources/templates/1-EmailTemplate.html
Status: ${status!"UNKNOWN"} <#if commonLabels??> <#if commonLabels.severity??> <#assign severityClass = commonLabels.severity?switch( "critical", "severity-critical", "warning", "severity-warning", "info", "severity-info", "")> Severity: ${commonLabels.severity?switch( "critical", "❤️ Critical", "warning", "💛 Warning", "info", "💚 Info", "Unknown")} #if> <#if commonLabels.alertname??> Alert Name: ${commonLabels.alertname?html} #if> #if>
<#if alerts?? && alerts?size gt 0> <#list alerts as alert>
<#if alert.labels?? && alert.labels?size gt 0> <#list alert.labels?keys as key> ${key?html}: ${alert.labels[key]?html} #list> #if> <#if alert.content?? && alert.content != ""> Content: ${alert.content?html} #if> Trigger Count: ${alert.triggerTimes!0}
Start Time: ${((alert.startAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')} <#if alert.activeAt?? && alert.activeAt gt 0> Active Time: ${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')} #if> <#if alert.endAt?? && alert.endAt gt 0> End Time: ${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')} #if> <#if alert.annotations?? && alert.annotations?size gt 0>
<#list alert.annotations?keys as key> ${key?html}: ${alert.annotations[key]?html} #list> #if> #list> #if> <#if commonAnnotations?? && commonAnnotations?size gt 0>
<#list commonAnnotations?keys as key> ${key?html}: ${commonAnnotations[key]?html} #list> #if>