Merge pull request #8 from philicious/master

Refactored deprecated services
This commit is contained in:
Brian Christner 2016-07-14 08:29:35 +02:00 committed by GitHub
commit fe78582338
3 changed files with 46 additions and 66 deletions

2
config.monitoring Normal file
View File

@ -0,0 +1,2 @@
GF_SECURITY_ADMIN_PASSWORD=foobar
GF_USERS_ALLOW_SIGN_UP=false

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: {}
volumes: grafana_data: {}
- /sys/fs/cgroup:/cgroup
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9104:9104"
expose:
- "9104"
labels:
- "name=exporter"
- "description=Exports prom data"
- "version=latest"
sqlite3: services:
image: "prom/promdash" prometheus:
command: image: prom/prometheus
- "./bin/rake db:migrate" volumes:
volumes: - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- "/tmp/prom:/tmp/prom" - prometheus_data:/prometheus
environment: command:
- "DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3" - '-config.file=/etc/prometheus/prometheus.yml'
- '-storage.local.path=/prometheus'
promdash: expose:
image: "prom/promdash" - 9090
ports: links:
- "3000:3000" - cadvisor:cadvisor
expose: depends_on:
- "3000" - cadvisor
volumes: node-exporter:
- /tmp/prom:/tmp/prom image: prom/node-exporter
environment: expose:
- "DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3" - 9100
labels: cadvisor:
- "name=prom dashboard" image: google/cadvisor
- "description=Dashboards for metrics" volumes:
- "version=latest" - /:/rootfs:ro
- /var/run:/var/run:rw
cadvisor: - /sys:/sys:ro
image: "google/cadvisor" - /var/lib/docker/:/var/lib/docker:ro
volumes: expose:
- "/:/rootfs:ro" - 8080
- "/var/run:/var/run:rw" grafana:
- "/sys:/sys:ro" image: grafana/grafana
- "/var/lib/docker/:/var/lib/docker:ro" depends_on:
ports: - prometheus
- "8080:8080" ports:
expose: - 3000:3000
- "8080" volumes:
labels: - grafana_data:/var/lib/grafana
- "name=cAdvisor" env_file:
- "description=Google Container Advisor collects metrics from host and containers" - config.monitoring
- "version=latest"

View File

@ -7,7 +7,7 @@ global:
# Attach these labels to any time series or alerts when communicating with # Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager). # external systems (federation, remote storage, Alertmanager).
external_labels: external_labels:
monitor: 'codelab-monitor' monitor: 'my-project'
# Load and evaluate rules in this file every 'evaluation_interval' seconds. # Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files: rule_files:
@ -15,7 +15,6 @@ rule_files:
# - "second.rules" # - "second.rules"
# A scrape configuration containing exactly one endpoint to scrape: # A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs: scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus' - job_name: 'prometheus'
@ -28,4 +27,4 @@ scrape_configs:
# scheme defaults to 'http'. # scheme defaults to 'http'.
target_groups: target_groups:
- targets: ['localhost:9090','cadvisor:8080'] - targets: ['localhost:9090','cadvisor:8080','node-exporter:9100']