ajout du TP5/6

This commit is contained in:
2024-03-19 23:08:54 +01:00
parent 64dc0e433d
commit cc92379958
5 changed files with 152 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
services:
cadvisor:
image: google/cadvisor:latest
ports:
- 8080:8080
restart: unless-stopped
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro*
node-exporter:
image: prom/node-exporter:latest
ports:
- 9100:9100
restart: unless-stopped

View File

@@ -0,0 +1,6 @@
services:
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
restart: unless-stopped

View File

@@ -0,0 +1,8 @@
services:
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
volumes:
- ./prometheus/:/etc/prometheus/
ports:
- 9090:9090

View File

@@ -0,0 +1,19 @@
global:
scrape_interval: 1m
evaluation_interval: 1m
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 1m
static_configs:
- targets: ['localhost:9090']
- job_name: 'node'
static_configs:
- targets: ['node-exporter:9100']
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']