2019-05-22 21:23:23 +00:00
|
|
|
version: '3.5'
|
|
|
|
services:
|
2020-07-16 23:18:03 +00:00
|
|
|
vmagent:
|
|
|
|
container_name: vmagent
|
|
|
|
image: victoriametrics/vmagent
|
2019-05-22 21:23:23 +00:00
|
|
|
depends_on:
|
2020-07-16 23:18:03 +00:00
|
|
|
- "vminsert"
|
2019-05-22 21:23:23 +00:00
|
|
|
ports:
|
2020-07-16 23:18:03 +00:00
|
|
|
- 8429:8429
|
2019-05-22 21:23:23 +00:00
|
|
|
volumes:
|
2020-07-16 23:18:03 +00:00
|
|
|
- vmagentdata:/vmagentdata
|
2019-05-22 21:23:23 +00:00
|
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
command:
|
2020-07-16 23:18:03 +00:00
|
|
|
- '--promscrape.config=/etc/prometheus/prometheus.yml'
|
|
|
|
- '--remoteWrite.url=http://vminsert:8480/insert/0/prometheus/'
|
2019-05-22 21:23:23 +00:00
|
|
|
restart: always
|
2019-11-07 10:09:27 +00:00
|
|
|
|
|
|
|
grafana:
|
|
|
|
container_name: grafana
|
2022-07-18 11:26:23 +00:00
|
|
|
image: grafana/grafana:9.0.3
|
2019-11-07 10:09:27 +00:00
|
|
|
depends_on:
|
2020-07-16 23:18:03 +00:00
|
|
|
- "vmselect"
|
2019-11-07 10:09:27 +00:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- grafanadata:/var/lib/grafana
|
|
|
|
- ./provisioning/:/etc/grafana/provisioning/
|
2020-07-16 23:18:03 +00:00
|
|
|
- ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
|
|
|
- ./../../dashboards/vmagent.json:/var/lib/grafana/dashboards/vmagent.json
|
2021-09-01 07:25:07 +00:00
|
|
|
- ./../../dashboards/vmalert.json:/var/lib/grafana/dashboards/vmalert.json
|
2019-11-07 10:09:27 +00:00
|
|
|
|
2021-10-22 16:26:02 +00:00
|
|
|
vmstorage-1:
|
|
|
|
container_name: vmstorage-1
|
2019-12-24 11:27:12 +00:00
|
|
|
image: victoriametrics/vmstorage
|
2019-05-22 21:23:23 +00:00
|
|
|
ports:
|
2019-11-07 10:09:27 +00:00
|
|
|
- 8482
|
|
|
|
- 8400
|
|
|
|
- 8401
|
2019-05-22 21:23:23 +00:00
|
|
|
volumes:
|
2021-10-22 16:26:02 +00:00
|
|
|
- strgdata-1:/storage
|
|
|
|
command:
|
|
|
|
- '--storageDataPath=/storage'
|
|
|
|
restart: always
|
|
|
|
vmstorage-2:
|
|
|
|
container_name: vmstorage-2
|
|
|
|
image: victoriametrics/vmstorage
|
|
|
|
ports:
|
|
|
|
- 8482
|
|
|
|
- 8400
|
|
|
|
- 8401
|
|
|
|
volumes:
|
|
|
|
- strgdata-2:/storage
|
2019-05-22 21:23:23 +00:00
|
|
|
command:
|
|
|
|
- '--storageDataPath=/storage'
|
|
|
|
restart: always
|
2019-07-19 22:20:04 +00:00
|
|
|
vminsert:
|
|
|
|
container_name: vminsert
|
2019-12-24 11:27:12 +00:00
|
|
|
image: victoriametrics/vminsert
|
2019-05-22 21:23:23 +00:00
|
|
|
depends_on:
|
2021-10-22 16:26:02 +00:00
|
|
|
- "vmstorage-1"
|
|
|
|
- "vmstorage-2"
|
2019-05-22 21:23:23 +00:00
|
|
|
command:
|
2021-10-22 16:26:02 +00:00
|
|
|
- '--storageNode=vmstorage-1:8400'
|
|
|
|
- '--storageNode=vmstorage-2:8400'
|
2019-07-19 22:20:04 +00:00
|
|
|
ports:
|
2019-11-07 10:09:27 +00:00
|
|
|
- 8480
|
2019-05-22 21:23:23 +00:00
|
|
|
restart: always
|
2019-07-19 22:20:04 +00:00
|
|
|
vmselect:
|
|
|
|
container_name: vmselect
|
2019-12-24 11:27:12 +00:00
|
|
|
image: victoriametrics/vmselect
|
2019-05-22 21:23:23 +00:00
|
|
|
depends_on:
|
2021-10-22 16:26:02 +00:00
|
|
|
- "vmstorage-1"
|
|
|
|
- "vmstorage-2"
|
2019-05-22 21:23:23 +00:00
|
|
|
command:
|
2021-10-22 16:26:02 +00:00
|
|
|
- '--storageNode=vmstorage-1:8401'
|
|
|
|
- '--storageNode=vmstorage-2:8401'
|
2022-05-06 14:30:41 +00:00
|
|
|
- '--vmalert.proxyURL=http://vmalert:8880'
|
2019-05-22 21:23:23 +00:00
|
|
|
ports:
|
|
|
|
- 8481:8481
|
|
|
|
restart: always
|
2019-11-07 10:09:27 +00:00
|
|
|
|
2021-04-05 19:29:04 +00:00
|
|
|
vmalert:
|
|
|
|
container_name: vmalert
|
|
|
|
image: victoriametrics/vmalert
|
|
|
|
depends_on:
|
|
|
|
- "vmselect"
|
|
|
|
ports:
|
|
|
|
- 8880:8880
|
|
|
|
volumes:
|
|
|
|
- ./alerts.yml:/etc/alerts/alerts.yml
|
|
|
|
command:
|
|
|
|
- '--datasource.url=http://vmselect:8481/select/0/prometheus'
|
|
|
|
- '--remoteRead.url=http://vmselect:8481/select/0/prometheus'
|
|
|
|
- '--remoteWrite.url=http://vminsert:8480/insert/0/prometheus'
|
|
|
|
- '--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 below be aware of '$$' for escaping in '$expr'
|
|
|
|
- '--external.alert.source=explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":"{{$$expr|quotesEscape|crlfEscape|queryEscape}}"},{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]'
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
alertmanager:
|
|
|
|
container_name: alertmanager
|
|
|
|
image: prom/alertmanager
|
|
|
|
volumes:
|
|
|
|
- ./alertmanager.yml:/config/alertmanager.yml
|
|
|
|
command:
|
|
|
|
- '--config.file=/config/alertmanager.yml'
|
|
|
|
ports:
|
|
|
|
- 9093:9093
|
|
|
|
restart: always
|
|
|
|
|
2019-05-22 21:23:23 +00:00
|
|
|
volumes:
|
2020-07-16 23:18:03 +00:00
|
|
|
vmagentdata: {}
|
2021-10-22 16:26:02 +00:00
|
|
|
strgdata-1: {}
|
|
|
|
strgdata-2: {}
|
2019-11-07 10:09:27 +00:00
|
|
|
grafanadata: {}
|