Last active
April 9, 2018 09:50
-
-
Save songjiayang/354f2b4387880d18c10185288e1d8a47 to your computer and use it in GitHub Desktop.
golang time format in template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "wechat.default.message" }} | |
{{ range .Alerts }} | |
告警级别:{{ .Labels.severity }} | |
告警类型:{{ .Labels.alertname }} | |
故障主机: {{ .Labels.instance }} | |
告警主题: {{ .Annotations.summary }} | |
告警详情: {{ .Annotations.description }} | |
触发时间: {{ .StartsAt.Format "2006-01-02 15:04:05" }} | |
{{ end }} | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment