为什么alertmanager不发送短信
我正在使用警报管理器和普罗米修斯来监视我的堆栈。
当我配置通过警报管理器发送邮件时,它工作正常,但当我配置通过 webhook 发送短信时,它会失败。
我向警报管理器添加了调试标志,以验证它是否收到警报,并且警报确实即将到来,但直到没有发送短信为止。
我还单独检查了 webhook,它工作得很好。
配置文件是:
global:
resolve_timeout: '5m'
smtp_smarthost: 'smtp.office365.com:587'
smtp_from: '[email protected]'
smtp_auth_username: '[email protected]'
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: '[email protected]'
我尝试只发送邮件,它可以工作,只尝试发送短信,但它不起作用。
我缺少什么?
I am using alert-manager and Prometheus to monitor my stack.
When I configure sending mails via alert-manager it works fine but when I configure to send sms via webhook it fails.
I added debug flag to alert-manager to verify it is getting the alerts and indeed the alerts are coming but till no sms are sent.
I also checked the webhook separately and it works perfectly.
Config file is:
global:
resolve_timeout: '5m'
smtp_smarthost: 'smtp.office365.com:587'
smtp_from: '[email protected]'
smtp_auth_username: '[email protected]'
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: '[email protected]'
I tried putting only mails and it works , tried only sms and it oes not work.
What am I missing ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最终,我编写了一个短信“代理”,它将获得一个简单的 url get 调用,并在内部调用 nexmo。
它没有任何其他方式工作。
Eventually , I wrote a sms 'proxy' that will get a simple url get invocation and internally will call nexmo.
It did not work any other way.