diff --git a/README.md b/README.md index 9de9424..ed64a07 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,8 @@ information on how to submit your changes to this repository. ## Sample view +See ./examples for docker-compose file with Grafana if you'd like to quickly get a test environment up and running. + If you have [promdash](https://github.com/prometheus/promdash) set up you can generate views like: diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml new file mode 100644 index 0000000..798eeac --- /dev/null +++ b/examples/docker-compose.yml @@ -0,0 +1,29 @@ +# Example usage of exporter in use + +# In this case, it depends on the proper ceph keys in the correct place. + +version: '2' + +services: + prometheus: + image: prom/prometheus:v1.6.1 + volumes: + - './prometheus.yml:/etc/prometheus/prometheus.yml' + command: + - '-config.file=/etc/prometheus/prometheus.yml' + ports: + - '9090:9090' + ceph-exporter: + image: digitalocean/ceph_exporter + volumes: + - '/etc/ceph:/etc/ceph' + ports: + - '9128:9128' + grafana: + image: grafana/grafana:4.2.0 + environment: + - GF_SECURITY_ADMIN_PASSWORD=test + depends_on: + - prometheus + ports: + - "3000:3000" diff --git a/examples/prometheus.yml b/examples/prometheus.yml new file mode 100644 index 0000000..bb0daf9 --- /dev/null +++ b/examples/prometheus.yml @@ -0,0 +1,14 @@ +# prometheus.yml +# Place in same directory as docker-compose.yml and replace $DOCKERHOST with your desired host IP where ceph_exporter is running + +global: + scrape_interval: 5s + external_labels: + monitor: 'my-monitor' +scrape_configs: + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:9090'] + - job_name: 'ceph-exporter' + static_configs: + - targets: ['$DOCKERHOST:9128']