added docker volumes, adjusted README

This commit is contained in:
Sean Kloeckner 2017-05-01 16:13:27 -07:00
parent 544c99c7b3
commit 2b31f59864
3 changed files with 18 additions and 7 deletions

View File

@ -78,6 +78,10 @@ information on how to submit your changes to this repository.
See ./examples for docker-compose file with Grafana if you'd like to quickly get a test environment up and running.
Link to official documentation explaining docker-compose: https://docs.docker.com/compose/
Docker-compose file itself has comments on how to change it to adapt to your environment.
If you have [promdash](https://github.com/prometheus/promdash) set up you
can generate views like:

View File

@ -1,6 +1,9 @@
# Example usage of exporter in use
# In this case, it depends on the proper ceph keys in the correct place.
# In this case, it depends on the proper ceph keys in the correct place. Adapt this to your use case if you would like to use in production
# CEPHCONF = /etc/ceph is usually the folder you want, if you're storing them somewhere else, change the value below
version: '2'
@ -8,21 +11,25 @@ services:
prometheus:
image: prom/prometheus:v1.6.1
volumes:
- './prometheus.yml:/etc/prometheus/prometheus.yml'
- ./prometheus.yml:/etc/prometheus/prometheus.yml
volumes:
- prometheus_data:/prometheus
command:
- '-config.file=/etc/prometheus/prometheus.yml'
- -config.file=/etc/prometheus/prometheus.yml
ports:
- '9090:9090'
ceph-exporter:
image: digitalocean/ceph_exporter
volumes:
- '/etc/ceph:/etc/ceph'
- $CEPHCONF:/etc/ceph
ports:
- '9128:9128'
grafana:
image: grafana/grafana:4.2.0
environment:
- GF_SECURITY_ADMIN_PASSWORD=test
volumes:
- grafana_data:/var/lib/grafana
depends_on:
- prometheus
ports:

View File

@ -4,11 +4,11 @@
global:
scrape_interval: 5s
external_labels:
monitor: 'my-monitor'
monitor: my-monitor
scrape_configs:
- job_name: 'prometheus'
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
- job_name: 'ceph-exporter'
- job_name: ceph-exporter
static_configs:
- targets: ['$DOCKERHOST:9128']