forked from cerc-io/stack-orchestrator
Configure prometheus alert manager with Slack notifications
This commit is contained in:
parent
ed8914b8d3
commit
b036e26087
@ -18,6 +18,14 @@ services:
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
alert-manager:
|
||||
image: prom/alertmanager
|
||||
volumes:
|
||||
- ../config/monitoring/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
|
||||
- alertmanager_data:/data
|
||||
ports:
|
||||
- "9093"
|
||||
|
||||
blackbox:
|
||||
image: prom/blackbox-exporter:latest
|
||||
restart: always
|
||||
@ -55,3 +63,4 @@ services:
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
alertmanager_data:
|
||||
|
@ -0,0 +1,10 @@
|
||||
route:
|
||||
receiver: 'slack'
|
||||
# group_by: [ alertname ]
|
||||
|
||||
receivers:
|
||||
- name: 'slack'
|
||||
slack_configs:
|
||||
- send_resolved: true
|
||||
api_url: <YOUR_SLACK_WEBHOOK_URL>
|
||||
channel: <YOUR_SLACK_CHANNEL>
|
@ -3,8 +3,13 @@ global:
|
||||
evaluation_interval: 15s
|
||||
|
||||
rule_files:
|
||||
# - "first.rules"
|
||||
# - "second.rules"
|
||||
- rules.yml
|
||||
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets:
|
||||
- alert-manager:9093
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
|
@ -0,0 +1,10 @@
|
||||
groups:
|
||||
- name: WatcherAlerts
|
||||
rules:
|
||||
- alert: SushiswapWatcherHeadTracking
|
||||
expr: latest_block_number - on(chain) group_right sync_status_block_number{job="sushi", instance="sushiswap", kind="latest_indexed"} > 16
|
||||
for: 5m
|
||||
labels:
|
||||
severity: 'critical'
|
||||
annotations:
|
||||
summary: 'Watcher {{ $labels.instance }} of job {{ $labels.job }} is falling behind external head'
|
Loading…
Reference in New Issue
Block a user