2024-01-17 19:49:51 +00:00
|
|
|
services:
|
|
|
|
vmagent:
|
|
|
|
container_name: vmagent
|
2024-08-29 13:13:19 +00:00
|
|
|
image: victoriametrics/vmagent:v1.103.0
|
2024-01-17 19:49:51 +00:00
|
|
|
depends_on:
|
|
|
|
- "victoriametrics"
|
|
|
|
ports:
|
|
|
|
- 8429:8429
|
|
|
|
volumes:
|
|
|
|
- vmagentdata-guide-vmanomaly-vmalert:/vmagentdata
|
|
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
command:
|
|
|
|
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
|
|
|
- "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
victoriametrics:
|
|
|
|
container_name: victoriametrics
|
2024-08-29 13:13:19 +00:00
|
|
|
image: victoriametrics/victoria-metrics:v1.103.0
|
2024-01-17 19:49:51 +00:00
|
|
|
ports:
|
|
|
|
- 8428:8428
|
|
|
|
volumes:
|
|
|
|
- vmdata-guide-vmanomaly-vmalert:/storage
|
|
|
|
command:
|
|
|
|
- "--storageDataPath=/storage"
|
|
|
|
- "--httpListenAddr=:8428"
|
|
|
|
- "--vmalert.proxyURL=http://vmalert:8880"
|
|
|
|
- "-search.disableCache=1" # for guide only, do not use in production
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
grafana:
|
|
|
|
container_name: grafana
|
|
|
|
image: grafana/grafana-oss:10.2.1
|
|
|
|
depends_on:
|
|
|
|
- "victoriametrics"
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
volumes:
|
|
|
|
- grafanadata-guide-vmanomaly-vmalert:/var/lib/grafana
|
2024-01-26 16:12:58 +00:00
|
|
|
- ./provisioning/datasources:/etc/grafana/provisioning/datasources
|
|
|
|
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
|
|
|
- ./vmanomaly_guide_dashboard.json:/var/lib/grafana/dashboards/vmanomaly_guide_dashboard.json
|
2024-01-17 19:49:51 +00:00
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
vmalert:
|
|
|
|
container_name: vmalert
|
2024-08-29 13:13:19 +00:00
|
|
|
image: victoriametrics/vmalert:v1.103.0
|
2024-01-17 19:49:51 +00:00
|
|
|
depends_on:
|
|
|
|
- "victoriametrics"
|
|
|
|
ports:
|
|
|
|
- 8880:8880
|
|
|
|
volumes:
|
|
|
|
- ./vmalert_config.yml:/etc/alerts/alerts.yml
|
|
|
|
command:
|
|
|
|
- "--datasource.url=http://victoriametrics:8428/"
|
|
|
|
- "--remoteRead.url=http://victoriametrics:8428/"
|
|
|
|
- "--remoteWrite.url=http://victoriametrics:8428/"
|
|
|
|
- "--notifier.url=http://alertmanager:9093/"
|
|
|
|
- "--rule=/etc/alerts/*.yml"
|
|
|
|
# display source of alerts in grafana
|
|
|
|
- "--external.url=http://127.0.0.1:3000" #grafana outside container
|
|
|
|
# when copypaste the line be aware of '$$' for escaping in '$expr'
|
|
|
|
- '--external.alert.source=explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr": },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]'
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
vmanomaly:
|
|
|
|
container_name: vmanomaly
|
2024-02-22 17:48:54 +00:00
|
|
|
image: victoriametrics/vmanomaly:v1.11.0
|
2024-01-17 19:49:51 +00:00
|
|
|
depends_on:
|
|
|
|
- "victoriametrics"
|
|
|
|
ports:
|
2024-01-26 16:12:58 +00:00
|
|
|
- "8490:8490"
|
2024-01-17 19:49:51 +00:00
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- ./vmanomaly_config.yml:/config.yaml
|
2024-01-26 16:12:58 +00:00
|
|
|
- ./vmanomaly_license:/license
|
2024-01-17 19:49:51 +00:00
|
|
|
platform: "linux/amd64"
|
|
|
|
command:
|
|
|
|
- "/config.yaml"
|
2024-01-26 16:12:58 +00:00
|
|
|
- "--license-file=/license"
|
2024-01-17 19:49:51 +00:00
|
|
|
alertmanager:
|
|
|
|
container_name: alertmanager
|
2024-02-29 12:21:02 +00:00
|
|
|
image: prom/alertmanager:v0.27.0
|
2024-01-17 19:49:51 +00:00
|
|
|
volumes:
|
|
|
|
- ./alertmanager.yml:/config/alertmanager.yml
|
|
|
|
command:
|
|
|
|
- "--config.file=/config/alertmanager.yml"
|
|
|
|
ports:
|
|
|
|
- 9093:9093
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
node-exporter:
|
|
|
|
image: quay.io/prometheus/node-exporter:v1.7.0
|
|
|
|
container_name: node-exporter
|
|
|
|
ports:
|
|
|
|
- 9100:9100
|
|
|
|
pid: host
|
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
vmagentdata-guide-vmanomaly-vmalert: {}
|
|
|
|
vmdata-guide-vmanomaly-vmalert: {}
|
|
|
|
grafanadata-guide-vmanomaly-vmalert: {}
|
|
|
|
networks:
|
|
|
|
vm_net:
|