|
| 1 | +### |
| 2 | +# |
| 3 | +# Copyright © 2017-2025 Crunchy Data Solutions, Inc. All Rights Reserved. |
| 4 | +# |
| 5 | +### |
| 6 | + |
| 7 | +# Based on upstream example file found here: https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml |
| 8 | +global: |
| 9 | + smtp_smarthost: 'localhost: 25' |
| 10 | + smtp_require_tls: false |
| 11 | + smtp_from: 'Alertmanager <[email protected]>' |
| 12 | +# smtp_smarthost: 'smtp.example.com:587' |
| 13 | +# smtp_from: 'Alertmanager <[email protected]>' |
| 14 | +# smtp_auth_username: '<username>' |
| 15 | +# smtp_auth_password: '<password>' |
| 16 | + |
| 17 | +# templates: |
| 18 | +# - '/etc/alertmanager/template/*.tmpl' |
| 19 | + |
| 20 | +inhibit_rules: |
| 21 | +# Apply inhibition of warning if the alertname for the same system and service is already critical |
| 22 | +- source_match: |
| 23 | + severity: 'critical' |
| 24 | + target_match: |
| 25 | + severity: 'warning' |
| 26 | + equal: ['alertname', 'job', 'service'] |
| 27 | + |
| 28 | +receivers: |
| 29 | +- name: 'default-receiver' |
| 30 | + email_configs: |
| 31 | + |
| 32 | + send_resolved: true |
| 33 | + |
| 34 | +## Examples of alternative alert receivers. See documentation for more info on how to configure these fully |
| 35 | +#- name: 'pagerduty-dba' |
| 36 | +# pagerduty_configs: |
| 37 | +# - service_key: <RANDOMKEYSTUFF> |
| 38 | + |
| 39 | +#- name: 'pagerduty-sre' |
| 40 | +# pagerduty_configs: |
| 41 | +# - service_key: <RANDOMKEYSTUFF> |
| 42 | + |
| 43 | +#- name: 'dba-team' |
| 44 | +# email_configs: |
| 45 | + |
| 46 | +# send_resolved: true |
| 47 | + |
| 48 | +#- name: 'sre-team' |
| 49 | +# email_configs: |
| 50 | + |
| 51 | +# send_resolved: true |
| 52 | + |
| 53 | +route: |
| 54 | + receiver: default-receiver |
| 55 | + group_by: [severity, service, job, alertname] |
| 56 | + group_wait: 30s |
| 57 | + group_interval: 5m |
| 58 | + repeat_interval: 24h |
| 59 | + |
| 60 | +## Example routes to show how to route outgoing alerts based on the content of that alert |
| 61 | +# routes: |
| 62 | +# - match_re: |
| 63 | +# service: ^(postgresql|mysql|oracle)$ |
| 64 | +# receiver: dba-team |
| 65 | +# # sub route to send critical dba alerts to pagerduty |
| 66 | +# routes: |
| 67 | +# - match: |
| 68 | +# severity: critical |
| 69 | +# receiver: pagerduty-dba |
| 70 | +# |
| 71 | +# - match: |
| 72 | +# service: system |
| 73 | +# receiver: sre-team |
| 74 | +# # sub route to send critical sre alerts to pagerduty |
| 75 | +# routes: |
| 76 | +# - match: |
| 77 | +# severity: critical |
| 78 | +# receiver: pagerduty-sre |
0 commit comments