Skip to content

Instantly share code, notes, and snippets.

@ViKingIX
Last active October 5, 2021 15:44
Show Gist options
  • Save ViKingIX/2350b52a1f8078c6b1564cb998b6e35b to your computer and use it in GitHub Desktop.
Save ViKingIX/2350b52a1f8078c6b1564cb998b6e35b to your computer and use it in GitHub Desktop.
Monitoring Ceph with Prometheus and Grafana

Monitoring Ceph with Prometheus and Grafana

Concepts

  • Ceph Exporter: returns data on demand
  • Prometheus: data collector
  • Grafana: data visualizer

Installataion Steps

  1. Deploy ceph-exporter on host that has access to ceph
docker run -dp 9128:9128 --name ceph-exporter digitalocean/ceph_exporter
  1. Deploy Prometheus on monitoring host
docker volume create prometheus-data
mkdir /etc/prometheus
curl https://raw.githubusercontent.com/prometheus/prometheus/master/documentation/examples/prometheus.yml -O /etc/prometheus/prometheus.yml
docker run -dp 9090:9090 --name prometheus -v prometheus-data:/prometheus-data -v /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
  1. Config Prometheus to retrieve data from ceph-exporter add the following to scrape_configs section in prometheus.yml
- job_name: ceph
  static_configs:
    - targets: ["$CEPH_EXPORTER_HOST"]

Then restart the prometheus container 4. Deploy Grafana

docker volume create grafana-data
docker run -dp 3000:3000 --name grafana -v grafana-data:/var/lib/grafana grafana/grafana
  1. Configure grafana
    • add prometheus data source
    • add dashboards

Written with StackEdit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment