我有两个无法解决的问题,因为我不知道我是否遗漏了一些东西..
这是我有前途的配置,因此我想通过短信或通过 Pushover 接收警报,但它不起作用。
global:
resolve_timeout: 5m
route:
group_by: ['critical']
group_wait: 30s
group_interval: 180s
repeat_interval: 300s
receiver: myIT
receivers:
- name: 'myIT'
email_configs:
- to: me@myfirm
from: me@myfirm
smarthost: ssl0.ovh.net:587
auth_username: 'me@myfirm'
auth_identity: 'me@myfirm'
auth_password: 'ZZZZZZZZZZZZZZZZZ'
- name: Teams
webhook_configs:
- url: 'https://teams.microsoft.com/l/channel/19%3xxxxxxxxyyyyuxxxab%40thread.tacv2/Alertes?groupId=xxxxxxxxyyyyuxxx0&t enantId=3caa0abd-0122-496f-a6cf-73cb6d3aaadd'
send_resolved: true
- name: Sms
webhook_configs:
- url: 'https://www.ovh.com/cgi-bin/sms/http2sms.cgi?&account=sms-XXXXXXX-1&login=XXXXX&password=XXXXXXX&from=XXXXXX&to=0123456789&message=Alert '
send_resolved: true
- name: pushover
pushover_configs:
- user_key: xxxxxxxxyyyyuxxx
token: xxxxxxxxyyyyuxxx
对于 Pushover 部分,它通过我的 grafana 工作(但仍然不是一直如此)。对于 http2sms,它始终通过浏览器运行。
但是对于两者来说,它在alertmanager下都不起作用。我希望能够区分警报。例如,在团队中或通过电子邮件进行简单警告,并通过短信批评他们。 我是不是忘记安装什么东西了?
有人有类似这种需求的配置吗?谢谢你
嗯。我发现了。
route:
group_by: ['critical']
group_wait: 30s
group_interval: 180s
repeat_interval: 300s
receiver: myIT
receivers:
- name: 'myIT'
email_configs:
- to: me@myfirm
from: me@myfirm
smarthost: ssl0.ovh.net:587
auth_username: 'me@myfirm'
auth_identity: 'me@myfirm'
auth_password: 'ZZZZZZZZZZZZZZZZZ'
webhook_configs:
- url: 'https://teams.microsoft.com/l/channel/19%3xxxxxxxxyyyyuxxxab%40thread.tacv2/Alertes?groupId=xxxxxxxxyyyyuxxx0&t enantId=3caa0abd-0122-496f-a6cf-73cb6d3aaadd'
send_resolved: true
pushover_configs:
- user_key: xxxxxxxxyyyyuxxx
token: xxxxxxxxyyyyuxxx
这样就可以正常工作了。