我正在尝试为通知配置 Prometheus alert-manager
和 slack
。但它失败并出现以下错误。
alertmanager | level=warn ts=2021-01-11T05:53:56.925Z caller=notify.go:674 component=dispatcher receiver=slack integration=slack[0] msg="Notify attempt failed, will retry later" attempts=1 err="Post \"<redacted>\": x509: certificate signed by unknown authority"
alertmanager | level=error ts=2021-01-11T05:54:06.019Z caller=dispatch.go:309 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="slack/slack[0]: notify retry canceled after 7 attempts: Post \"<redacted>\": x509: certificate signed by unknown authority"
我的 alertmanager.yml
配置文件如下。
global:
resolve_timeout: 5m
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 1h
receiver: 'slack'
receivers:
- name: 'slack'
slack_configs:
- api_url: "Slack webhook api"
channel: '#slack channel'
send_resolved: true
在alertmanager中解决这个问题的方法是什么?
答案 0 :(得分:0)
以下附加条目有助于在 slack 中获得通知。
http_config:
tls_config:
insecure_skip_verify: true