-
Notifications
You must be signed in to change notification settings - Fork 36
/
alertmanager.yml
42 lines (38 loc) · 1.56 KB
/
alertmanager.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
global:
# Time after which an alert is declared resolved
resolve_timeout: 5m
route:
# Default receiver for alerts
receiver: 'default' # Name of the default receiver to send alerts to
group_by: ['alertname'] # Group alerts by alertname
group_wait: 15s # Wait 15 seconds to group alerts
group_interval: 15s # Send all alerts as a batch every 15 seconds
repeat_interval: 1m # Repeat notifications every 1 minute
routes:
- receiver: 'webhook-receiver'
matchers:
- alertname = PeerInterfaceFlapping
continue: true # Continue to the next route if this route is matched
- receiver: 'keep'
matchers:
- severity =~ "critical|warning"
continue: true
receivers:
# Default receiver for alerts (if no matchers are found)
- name: 'default'
# Receiver for sending alerts to webhook service
- name: 'webhook-receiver'
webhook_configs:
- url: 'http://webhook:9997/v1/api/webhook'
send_resolved: true
# Receiver for sending alerts to Keep
- name: 'keep'
# Webhook configuration for Keep
webhook_configs:
- url: 'https://api.keephq.dev/alerts/event/prometheus' # URL for the Keep API
send_resolved: true # Send resolved alerts
http_config: # HTTP configuration for the webhook
basic_auth: # Basic authentication for the webhook
username: api_key # Username for the webhook
password_file: keep_api_key # Password file for the webhook