我正在使用警报管理器和Prometheus监视我的堆栈。
当我配置通过警报管理器发送邮件时,它可以正常工作,但是当我配置通过web钩子发送sms时,它会失败。
我在警报管理器中添加了调试标志,以验证它是否正在收到警报,并且警报确实正在到来,但直到没有发送sms为止。
我还单独检查了web钩子,它运行得很好。
配置文件是:
global:
resolve_timeout: '5m'
smtp_smarthost: 'smtp.office365.com:587'
smtp_from: 'no-reply@example.com'
smtp_auth_username: 'no-reply@example.com'
smtp_auth_password: 'xxxxx'
smtp_require_tls: true
route:
group_by: ['instance', 'severity']
group_wait: 30s
group_interval: 5m
repeat_interval: 3h
receiver: team-1
receivers:
- name: 'team-1'
webhook_configs:
- send_resolved: true
http_config: {}
#max_alerts: 0
url: 'https://rest.nexmo.com/sms/json?from=example&text=test&to=xxxxxxxxxxxx&api_key=xxxxxxx&api_secret=xxxxxxx'
email_configs:
- to: 'john.doe@example.com' 我试着只放邮件,它起作用了,只试了短信,它不起作用。
我错过了什么?
发布于 2022-03-20 08:56:36
最后,我写了一个sms‘代理’,它将得到一个简单的url调用,并在内部调用nexmo。
它没有用任何其他方法。
https://stackoverflow.com/questions/71420519
复制相似问题