metrics: add a basic setup, collect metrics for the server

This commit is contained in:
Marten Seemann
2024-01-13 11:47:37 +07:00
parent 459a6f3df9
commit e66a925d64
9 changed files with 261 additions and 8 deletions

View File

@@ -0,0 +1,25 @@
version: '3.8'
volumes:
prometheus_data: {}
grafana_data: {}
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
expose:
- 9090
grafana:
image: grafana/grafana:latest
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./datasources.yml:/etc/grafana/provisioning/datasources/prom.yml
ports:
- "3000:3000"