Skip to content

Instantly share code, notes, and snippets.

@songjiayang
Last active April 9, 2018 09:50
Show Gist options
  • Select an option

  • Save songjiayang/354f2b4387880d18c10185288e1d8a47 to your computer and use it in GitHub Desktop.

Select an option

Save songjiayang/354f2b4387880d18c10185288e1d8a47 to your computer and use it in GitHub Desktop.

Revisions

  1. songjiayang revised this gist Apr 9, 2018. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion format.tmpl
    Original file line number Diff line number Diff line change
    @@ -1 +1,10 @@
    创建时间: {{.StartsAt.Format "2006-01-02 15:04:05"}}
    {{ 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 }}
  2. songjiayang renamed this gist Apr 9, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. songjiayang revised this gist Apr 9, 2018. 1 changed file with 1 addition and 10 deletions.
    11 changes: 1 addition & 10 deletions wechat.tmpl
    Original file line number Diff line number Diff line change
    @@ -1,10 +1 @@
    {{ 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 }}
    创建时间: {{.StartsAt.Format "2006-01-02 15:04:05"}}
  4. songjiayang created this gist Apr 9, 2018.
    10 changes: 10 additions & 0 deletions wechat.tmpl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    {{ 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 }}