We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
定义的模板
[root@medcloud-test-prome alertmanager]# cat dingding-alert.tmpl {{ define "__subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }} {{ define "__alertmanagerURL" }}{{ .ExternalURL }}/#/alerts?receiver={{ .Receiver }}{{ end }} {{ define "default.__text_alert_list" }}{{ range . }} **告警级别:** \[{{ .Labels.severity | upper }}\] **告警目标:** {{ .Annotations.summary }} **触发时间:** {{ .StartsAt.Format "2006-01-02 15:04:05" }} **恢复时间:** {{ .EndsAt.Format "2006-01-02 15:04:05" }} **告警详情:** {{ .Annotations.description }}
日志报错 tail -n 30 /var/log/messages
May 20 18:30:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:30:43.688Z caller=notify.go:372 component=dispatcher msg="Error on notify" err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" context_err="context deadline exceeded" May 20 18:30:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:30:43.689Z caller=dispatch.go:301 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" May 20 18:31:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:31:43.689Z caller=notify.go:372 component=dispatcher msg="Error on notify" err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" context_err="context deadline exceeded" May 20 18:31:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:31:43.689Z caller=dispatch.go:301 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" May 20 18:32:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:32:43.689Z caller=notify.go:372 component=dispatcher msg="Error on notify" err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" context_err="context deadline exceeded" May 20 18:32:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:32:43.689Z caller=dispatch.go:301 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" May 20 18:33:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:33:43.689Z caller=notify.go:372 component=dispatcher msg="Error on notify" err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused" context_err="context deadline exceeded" May 20 18:33:43 medcloud-test-prome alertmanager: level=error ts=2020-05-20T10:33:43.689Z caller=dispatch.go:301 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="Post http://localhost:8060/dingtalk/ops_dingding/send: dial tcp [::1]:8060: connect: connection refused"
The text was updated successfully, but these errors were encountered:
你这是插件没运行,alertmanager没法把消息传给插件
Sorry, something went wrong.
No branches or pull requests
定义的模板
日志报错 tail -n 30 /var/log/messages
The text was updated successfully, but these errors were encountered: