Back to Hertzbeat

HertzBeat Alert Notification

hertzbeat-manager/src/main/resources/templates/1-EmailTemplate.html

1.8.01.6 KB
Original Source

🔔 HertzBeat Alert Notification

Alert Summary

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>

Alert Details

<#if alerts?? && alerts?size gt 0> <#list alerts as alert>

Alert ${alert?index + 1}

<#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>

Additional Information

<#list alert.annotations?keys as key> ${key?html}: ${alert.annotations[key]?html} #list> #if> #list> #if> <#if commonAnnotations?? && commonAnnotations?size gt 0>

Common Information

<#list commonAnnotations?keys as key> ${key?html}: ${commonAnnotations[key]?html} #list> #if>