mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
118 lines
3.1 KiB
YAML
118 lines
3.1 KiB
YAML
|
services:
|
||
|
vmagent:
|
||
|
container_name: vmagent
|
||
|
image: victoriametrics/vmagent:v1.96.0
|
||
|
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
|
||
|
image: victoriametrics/victoria-metrics:v1.96.0
|
||
|
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
|
||
|
- ./datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
|
||
|
networks:
|
||
|
- vm_net
|
||
|
restart: always
|
||
|
|
||
|
|
||
|
vmalert:
|
||
|
container_name: vmalert
|
||
|
image: victoriametrics/vmalert:v1.96.0
|
||
|
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
|
||
|
image: victoriametrics/vmanomaly:v1.7.2
|
||
|
depends_on:
|
||
|
- "victoriametrics"
|
||
|
ports:
|
||
|
- "8500:8500"
|
||
|
networks:
|
||
|
- vm_net
|
||
|
restart: always
|
||
|
volumes:
|
||
|
- ./vmanomaly_config.yml:/config.yaml
|
||
|
- ./vmanomaly_license.txt:/license.txt
|
||
|
platform: "linux/amd64"
|
||
|
command:
|
||
|
- "/config.yaml"
|
||
|
- "--license-file=/license.txt"
|
||
|
alertmanager:
|
||
|
container_name: alertmanager
|
||
|
image: prom/alertmanager:v0.25.0
|
||
|
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:
|