refactored compose to use grafana over promdash, added node-exporter for host metrics and use upstream prometheus

This commit is contained in:
cypherpunk 2016-07-13 14:33:55 +02:00
parent 1dc3279f5b
commit 9c6a93eddc

View File

@ -1,65 +1,44 @@
prometheus: version: '2'
image: "vegasbrianc/prom"
ports:
- "9090:9090"
links:
- "exporter:export"
- "cadvisor:cadvisor"
labels:
- "name=prometheus"
- "description=Core of Promethues"
- "version=0.16.1"
exporter: volumes:
image: "prom/container-exporter" prometheus_data: {}
grafana_data: {}
services:
prometheus:
image: prom/prometheus
volumes: volumes:
- /sys/fs/cgroup:/cgroup - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /var/run/docker.sock:/var/run/docker.sock - prometheus_data:/prometheus
ports:
- "9104:9104"
expose:
- "9104"
labels:
- "name=exporter"
- "description=Exports prom data"
- "version=latest"
sqlite3:
image: "prom/promdash"
command: command:
- "./bin/rake db:migrate" - '-config.file=/etc/prometheus/prometheus.yml'
volumes: - '-storage.local.path=/prometheus'
- "/tmp/prom:/tmp/prom"
environment:
- "DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3"
promdash:
image: "prom/promdash"
ports:
- "3000:3000"
expose: expose:
- "3000" - 9090
volumes: links:
- /tmp/prom:/tmp/prom - cadvisor:cadvisor
environment: depends_on:
- "DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3" - cadvisor
labels: node-exporter:
- "name=prom dashboard" image: prom/node-exporter
- "description=Dashboards for metrics"
- "version=latest"
cadvisor:
image: "google/cadvisor"
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:rw"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
ports:
- "8080:8080"
expose: expose:
- "8080" - 9100
labels: cadvisor:
- "name=cAdvisor" image: google/cadvisor
- "description=Google Container Advisor collects metrics from host and containers" volumes:
- "version=latest" - /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
expose:
- 8080
grafana:
image: grafana/grafana:3.0.4
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
env_file:
- config.monitoring