homework 10.3: complete 1 task, add partially complete 2 task

This commit is contained in:
2022-10-05 10:48:00 +07:00
parent 6b5f084474
commit cf7e8c27f2
9 changed files with 2312 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
---
version: "3.9"
services:
node-exporter:
image: prom/node-exporter:v1.4.0
container_name: node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
- "--path.rootfs=/rootfs"
- "--path.sysfs=/host/sys"
- "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)"
expose:
- 9100
prometheus:
image: prom/prometheus:v2.37.1
container_name: prometheus
volumes:
- ./prometheus/:/etc/prometheus/
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
- "--web.enable-lifecycle"
expose:
- 9090
depends_on:
node-exporter:
condition: service_completed_successfully
grafana:
image: grafana/grafana:9.1.7
expose:
- 3000
ports:
- "3000:3000"
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/