mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-28 09:11:18 +00:00
Move 'stacks' directory to 'compose' and refactor slides accordingly
This commit is contained in:
3
compose/prometheus/Dockerfile
Normal file
3
compose/prometheus/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM prom/prometheus:v1.4.1
|
||||
COPY prometheus.yml /etc/prometheus/prometheus.yml
|
||||
|
||||
30
compose/prometheus/docker-compose.yml
Normal file
30
compose/prometheus/docker-compose.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
prometheus:
|
||||
build: .
|
||||
image: 127.0.0.1:5000/prom
|
||||
ports:
|
||||
- "9090:9090"
|
||||
|
||||
node:
|
||||
image: prom/node-exporter
|
||||
command: --path.procfs /host/proc --path.sysfs /host/proc --collector.filesystem.ignored-mount-points "^(sys|proc|dev|host|etc)($$|/)"
|
||||
deploy:
|
||||
mode: global
|
||||
volumes:
|
||||
- "/proc:/host/proc"
|
||||
- "/sys:/host/sys"
|
||||
- "/:/rootfs"
|
||||
|
||||
cadvisor:
|
||||
image: google/cadvisor
|
||||
deploy:
|
||||
mode: global
|
||||
volumes:
|
||||
- "/:/rootfs"
|
||||
- "/var/run:/var/run"
|
||||
- "/sys:/sys"
|
||||
- "/var/lib/docker:/var/lib/docker"
|
||||
|
||||
17
compose/prometheus/prometheus.yml
Normal file
17
compose/prometheus/prometheus.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- job_name: 'node'
|
||||
dns_sd_configs:
|
||||
- names: ['tasks.node']
|
||||
type: 'A'
|
||||
port: 9100
|
||||
- job_name: 'cadvisor'
|
||||
dns_sd_configs:
|
||||
- names: ['tasks.cadvisor']
|
||||
type: 'A'
|
||||
port: 8080
|
||||
|
||||
35
compose/prometheus/stack-with-config.yml
Normal file
35
compose/prometheus/stack-with-config.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:v1.4.1
|
||||
ports:
|
||||
- "9090:9090"
|
||||
configs:
|
||||
- source: prometheus
|
||||
target: /etc/prometheus/prometheus.yml
|
||||
|
||||
node:
|
||||
image: prom/node-exporter
|
||||
command: --path.procfs /host/proc --path.sysfs /host/proc --collector.filesystem.ignored-mount-points "^(sys|proc|dev|host|etc)($$|/)"
|
||||
deploy:
|
||||
mode: global
|
||||
volumes:
|
||||
- "/proc:/host/proc"
|
||||
- "/sys:/host/sys"
|
||||
- "/:/rootfs"
|
||||
|
||||
cadvisor:
|
||||
image: google/cadvisor
|
||||
deploy:
|
||||
mode: global
|
||||
volumes:
|
||||
- "/:/rootfs"
|
||||
- "/var/run:/var/run"
|
||||
- "/sys:/sys"
|
||||
- "/var/lib/docker:/var/lib/docker"
|
||||
|
||||
configs:
|
||||
prometheus:
|
||||
file: ./prometheus.yml
|
||||
Reference in New Issue
Block a user