我正在尝试配置alertmanager的“路由”,以下是我的配置:
route:
group_by: ['instance']
group_wait: 30s
group_interval: 5m
repeat_interval: 7m
receiver: pager
routes:
- match:
severity: critical
receiver: email
- match_re:
severity: ^(warning|critical)$
receiver: support_team
receivers:
- name: 'email'
email_configs:
- to: 'xxxxxx@xx.com'
- name: 'support_team'
email_configs:
- to: 'xxxxxx@xx.com'
- name: 'pager'
email_configs:
- to: 'alert-pager@example.com'
现在,该电子邮件只能发送给默认的接收者“寻呼机”,而不会进一步路由到自定义的接收者。
答案 0 :(得分:0)
当要将警报路由到其他路由时,对于每个路由都需要此行。
continue: true
例如
route:
group_by: ['instance']
group_wait: 30s
group_interval: 5m
repeat_interval: 7m
receiver: pager
routes:
- match:
severity: critical
receiver: email
continue: true
- match_re:
severity: ^(warning|critical)$
receiver: support_team
continue: true
receivers:
- name: 'email'
email_configs:
- to: 'xxxxxx@xx.com'
- name: 'support_team'
email_configs:
- to: 'xxxxxx@xx.com'
- name: 'pager'
email_configs:
- to: 'alert-pager@example.com'
顺便说一句。 imho接收器应与yaml结构中的匹配级别相同。