Skip to content

Commit e4e6ffa

Browse files
committed
✨ add Slack integration for alert notifications
1 parent d06deab commit e4e6ffa

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ IGNORE_PUBLISHERS=BINANCE
2525
# Prometheus
2626
TELEGRAM_TOKEN=
2727
OPSGENIE_API_KEY=
28+
SLACK_API_URL=
2829

2930
# Server PORT
3031
PORT=8080

prometheus/alertmanager.yml

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
global:
22
resolve_timeout: 5m
3+
slack_api_url: "${{SLACK_API_URL}}"
34

45
route:
56
# When a new group of alerts is created by an incoming alert, wait at
@@ -41,13 +42,23 @@ route:
4142
severity: critical
4243
continue: true
4344

45+
- receiver: "Slack-internal"
46+
group_wait: 10s
47+
match_re:
48+
severity: warning
49+
continue: true
50+
4451
receivers:
4552
- name: "internal-warning"
4653
telegram_configs:
4754
- bot_token: "${{TELEGRAM_TOKEN}}}}"
4855
chat_id: -1001904637278
4956
parse_mode: "HTML"
5057
message: '{{ template "telegram.default.message" . }}'
58+
- name: "Slack-internal"
59+
slack_configs:
60+
- channel: "#internal-warning"
61+
send_resolved: false
5162
- name: "internal-critical"
5263
opsgenie_configs:
5364
- api_key: "${{OPS_GENIE_API_KEY}}"

0 commit comments

Comments
 (0)