Skip to content

Commit

Permalink
✨ add Slack integration for alert notifications (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
yezz123 authored Jan 17, 2025
1 parent d06deab commit a0d3690
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ IGNORE_PUBLISHERS=BINANCE
# Prometheus
TELEGRAM_TOKEN=
OPSGENIE_API_KEY=
SLACK_API_URL=

# Server PORT
PORT=8080
11 changes: 11 additions & 0 deletions prometheus/alertmanager.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
global:
resolve_timeout: 5m
slack_api_url: "${{SLACK_API_URL}}"

route:
# When a new group of alerts is created by an incoming alert, wait at
Expand Down Expand Up @@ -41,13 +42,23 @@ route:
severity: critical
continue: true

- receiver: "Slack-internal"
group_wait: 10s
match_re:
severity: warning
continue: true

receivers:
- name: "internal-warning"
telegram_configs:
- bot_token: "${{TELEGRAM_TOKEN}}}}"
chat_id: -1001904637278
parse_mode: "HTML"
message: '{{ template "telegram.default.message" . }}'
- name: "Slack-internal"
slack_configs:
- channel: "#internal-warning"
send_resolved: false
- name: "internal-critical"
opsgenie_configs:
- api_key: "${{OPS_GENIE_API_KEY}}"
Expand Down

0 comments on commit a0d3690

Please sign in to comment.