0

我有两个无法解决的问题,因为我不知道我是否遗漏了一些东西..

这是我很有前途的配置,因此我想通过短信或推送接收警报,但它不起作用。

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

对于推倒部分,它通过我的 grafana 工作(但并非一直如此)。对于 http2sms,它始终通过浏览器运行。

但对于两者来说,它在警报管理器下都不起作用。而且我希望能够区分警报。例如,团队中的简单警告或电子邮件,并通过短信批评他们。我忘记安装什么了吗?

有没有人有可能看起来像这种需求的配置?谢谢

4

1 回答 1

0

出色地。我发现。

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

它像那样工作得很好。

于 2022-01-26T16:37:58.770 回答