2024-02-26 10:33:04 +01:00
|
|
|
services:
|
|
|
|
# Grafana instance configured with VictoriaLogs as datasource
|
|
|
|
grafana:
|
|
|
|
container_name: grafana
|
2024-04-29 12:10:24 +02:00
|
|
|
image: grafana/grafana:10.4.2
|
2024-02-26 10:33:04 +01:00
|
|
|
depends_on:
|
|
|
|
- "victoriametrics"
|
|
|
|
- "victorialogs"
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
volumes:
|
|
|
|
- grafanadata:/var/lib/grafana
|
|
|
|
- ./provisioning/datasources/victorialogs-datasource:/etc/grafana/provisioning/datasources
|
|
|
|
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
|
|
|
- ./provisioning/plugins/:/var/lib/grafana/plugins
|
|
|
|
- ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
|
|
|
- ./../../dashboards/victorialogs.json:/var/lib/grafana/dashboards/vl.json
|
|
|
|
environment:
|
2024-06-25 13:36:34 +02:00
|
|
|
- "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.2.2/victorialogs-datasource-v0.2.2.zip;victorialogs-datasource"
|
2024-02-26 10:33:04 +01:00
|
|
|
- "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victorialogs-datasource"
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
# fluentbit is logs collector. It collects logs according to fluent-bit.conf
|
|
|
|
# and forwards them to VictoriaLogs
|
|
|
|
fluentbit:
|
|
|
|
container_name: fluentbit
|
|
|
|
image: cr.fluentbit.io/fluent/fluent-bit:2.1.4
|
|
|
|
volumes:
|
|
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
|
|
- ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
|
|
|
|
depends_on: [victorialogs]
|
|
|
|
ports:
|
|
|
|
- "5140:5140"
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
|
|
|
|
# VictoriaLogs instance, a single process responsible for
|
|
|
|
# storing logs and serving read queries.
|
|
|
|
victorialogs:
|
|
|
|
container_name: victorialogs
|
2024-07-10 03:08:16 +02:00
|
|
|
image: docker.io/victoriametrics/victoria-logs:v0.28.0-victorialogs
|
2024-02-26 10:33:04 +01:00
|
|
|
command:
|
|
|
|
- "--storageDataPath=/vlogs"
|
|
|
|
- "--httpListenAddr=:9428"
|
|
|
|
volumes:
|
|
|
|
- vldata:/vlogs
|
|
|
|
ports:
|
|
|
|
- "9428:9428"
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
|
|
|
|
# VictoriaMetrics instance, a single process responsible for
|
|
|
|
# scraping, storing metrics and serve read requests.
|
|
|
|
victoriametrics:
|
|
|
|
container_name: victoriametrics
|
2024-08-02 11:29:12 +02:00
|
|
|
image: victoriametrics/victoria-metrics:v1.102.1
|
2024-02-26 10:33:04 +01:00
|
|
|
ports:
|
|
|
|
- 8428:8428
|
|
|
|
volumes:
|
|
|
|
- vmdata:/storage
|
|
|
|
- ./prometheus-victorialogs.yml:/etc/prometheus/prometheus.yml
|
|
|
|
command:
|
|
|
|
- "--storageDataPath=/storage"
|
|
|
|
- "--httpListenAddr=:8428"
|
|
|
|
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
|
|
|
networks:
|
|
|
|
- vm_net
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
vmdata: {}
|
|
|
|
vldata: {}
|
|
|
|
grafanadata: {}
|
|
|
|
networks:
|
|
|
|
vm_net:
|