Verified Commit c497f039 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

Add skeleton for vmalert and alertmanager (without configuration)

parent 432035e2
......@@ -52,6 +52,7 @@ services:
- metrics
restart: unless-stopped
# Stores all metrics in a TSDB compatible with PromQL queries
vmagent:
image: victoriametrics/vmagent:v1.63.0
container_name: vmagent
......@@ -67,3 +68,41 @@ services:
networks:
- metrics
restart: unless-stopped
# Fires alerts based on custom rules (like disk > 80% etc)
vmalert:
image: victoriametrics/vmalert:v1.62.0
container_name: vmalert
command:
- "-rule=/config/vmalert-rules.yml"
# Where to read metrics
- "-datasource.url=http://victoria-metrics:8428"
# Where to write and read alert states, to keep
# state during restart, as vmagent stores states in memory
- "-remoteWrite.url=http://victoria-metrics:8428"
- "-remoteRead.url=http://victoriametrics:8428"
# Where to send alert when they must be triggered
- "-notifier.url=http://alertmanager:9093"
# HTTP server for vmagent's own metrics
- "-httpListenAddr=:8880"
# Evaluate rules every 10 minutes
- "-evaluationInterval=10m"
- "-loggerOutput=stdout"
volumes:
- ./vmalert-rules.yml:/config/vmalert-rules.yml
networks:
- metrics
restart: unless-stopped
# Receives alerts and decides what to do, e.g. send a mail or a Mattermost message
# Takes care of deduplication etc
alertmanager:
image: prom/alertmanager:v0.22.2
container_name: alertmanager
command:
- "--config.file=/config/alertmanager.yml"
volumes:
- ./alertmanager.yml:/config/alertmanager.yml
networks:
- metrics
restart: unless-stopped
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment