Skip to content

Commit 9d842a2

Browse files
MasamiYuiyinyijunzqr10159
authored
[bugfix] Wrong webhook alert template (apache#3265)
Co-authored-by: yinyijun <[email protected]> Co-authored-by: Logic <[email protected]>
1 parent c480d63 commit 9d842a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hertzbeat-manager/src/main/resources/templates/2-WebhookTemplate.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
</#if>
2727
"triggerTimes": ${alert.triggerTimes!0},
2828
"startAt": "${((alert.startAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}",
29-
<#if alert.activeAt?? && alert.activeAt gt 0>,
30-
"activeAt": "${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"
29+
<#if alert.activeAt?? && alert.activeAt gt 0>
30+
"activeAt": "${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}",
3131
</#if>
32-
<#if alert.endAt?? && alert.endAt gt 0>,
33-
"endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"
32+
<#if alert.endAt?? && alert.endAt gt 0>
33+
"endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"<#if alert.annotations?? && alert.annotations?size gt 0>,</#if>
3434
</#if>
35-
<#if alert.annotations?? && alert.annotations?size gt 0>,
35+
<#if alert.annotations?? && alert.annotations?size gt 0>
3636
"annotations": {
3737
<#list alert.annotations?keys as key>
3838
"${key}": "${alert.annotations[key]?json_string}"<#if key?has_next>,</#if>

0 commit comments

Comments
 (0)