Last active
April 11, 2018 15:06
-
-
Save elleryq/affc8261cfbaae908a5b to your computer and use it in GitHub Desktop.
docker + node-exporter + prometheus + promdash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Need to do the following steps: | |
# 1. create /var/prometheus first. | |
# 2. run: docker-compose run promdash ./bin/rake db:migrate | |
nodeexporter: | |
image: prom/node-exporter | |
ports: | |
- "9100:9100" | |
prometheus: | |
image: prom/prometheus | |
ports: | |
- "9090:9090" | |
volumes: | |
- "/var/prometheus:/prometheus" | |
- "${PWD}/conf:/etc/custom" | |
links: | |
- nodeexporter | |
entrypoint: /bin/prometheus | |
command: "-config.file=/etc/custom/prometheus.yml -storage.local.path=/prometheus -web.console.libraries=/etc/prometheus/console_libraries -web.console.templates=/etc/prometheus/consoles" | |
promdash: | |
image: prom/promdash | |
ports: | |
- "3000:3000" | |
environment: | |
- DATABASE_URL=sqlite3:/var/prometheus/file.sqlite3 | |
volumes: | |
- "/var/prometheus:/var/prometheus" | |
- /tmp/prom:/tmp/prom | |
links: | |
- prometheus | |
- nodeexporter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file should place in conf/ | |
global: | |
scrape_interval: 15s # By default, scrape targets every 15 seconds. | |
evaluation_interval: 15s # By default, scrape targets every 15 seconds. | |
# scrape_timeout is set to the global default (10s). | |
# Attach these extra labels to all timeseries collected by this Prometheus instance. | |
labels: | |
monitor: 'cyrix200-monitor' | |
# A scrape configuration containing exactly one endpoint to scrape: | |
# Here it's Prometheus itself. | |
scrape_configs: | |
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. | |
- job_name: 'prometheus' | |
# Override the global default and scrape targets from this job every 5 seconds. | |
scrape_interval: 5s | |
scrape_timeout: 10s | |
target_groups: | |
- targets: ['localhost:9090'] | |
- job_name: 'node-exporter' | |
scrape_interval: 15s | |
target_groups: | |
- targets: ['nodeexporter:9100'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment