Grafana Ceph Dashboard & Prometheus Integration

From OSNEXUS Online Documentation Site
Revision as of 18:31, 12 June 2024 by Qadmin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Installing Prometheus, Node Exporter, and Enabling the Ceph Prometheus Module

Step 1: Configure Ceph Cluster

1. Configure your Ceph Cluster using QuantaStor version 6.1 or newer. Grafana is installed by default on modern QuantaStor systems.

Step 2: Install Prometheus

1. Run the installer. Enter the following command from a console on one of your Ceph nodes:

install-ceph-prometheus

You have now successfully installed Prometheus, Node Exporter, and enabled the Ceph Prometheus Module.

Setting Up Grafana

Step 1: Login to Grafana

1. Login to Grafana: Navigate to http://YourServerIPorHostName:3000

Login with the default credentials of:

username: admin
password: admin

On initial login you will be prompted to set a new password.

2. Click the 'Toggle Menu' option in the upper left-hand side of Grafana to see the menu system.

Step 2: Add Prometheus Data Source

1. Add a new Prometheus data source:

  * On the left hand Menu, expand Connections, and click Data Sources to open the data sources page.
  * Note: on older grafana releases, the data sources page is under the gear icon in the left hand menu.

Graphical user interface, text
Click to expand image.

2. Click ‘Add new data source’’' and select Prometheus.

A screenshot of a computer screen
Click to expand image.


Click to expand image.

3. Enter the URL of Prometheus (node that you ran the 'install-ceph-prometheus' on):

  * For the URL, use http://localhost:9090 to connect to the local prometheus instance.
  * Set the HTTP Timeout to 60 and the Scrape Interval to 15s.
  * Click Save & Test.
  * Note: if you are connecting from a remote grafana instance the prometheus URL will be the IP of the QuantaStor system where you installed prometheus. example, use http://10.0.14.60:9090/.
  * Note: the dimmed grayed-out default values on this page are Grafana’s default suggestions and not actual values; you must enter a value. Correctly entered values will be shown in a white font.


Click to expand image.


Click to expand image.

After clicking Save & Test, you should see the status:

Graphical user interface, text, application
Click to expand image.

Step 3: Import Dashboard

1. Import Ceph Cluster Grafana dashboard:

  * On the Left Hand Menu click Dashboards in the left-side menu, click New, and select Import in the dropdown menu.
  * Enter 7056 in the 'Import via grafana.com' field and click Load.
  * Note: On older versions of Grafana you would Hover the mouse over the Dashboards icon and click on the Import menu item.


Click to expand image.


Click to expand image.

2. Optionally, change the Name field and select the Ceph Prometheus data source you just added.

Graphical user interface, text, application
Click to expand image.

You have now successfully integrated your Ceph Cluster with Prometheus, Node Exporter, and Grafana!


Click to expand image.

Additional Dashboards

Other Ceph Dashboards tested that work following the same import process:

CephFS #9340

Graphical user interface
Click to expand image.

Ceph - OSD (Single) #5336

Graphical user interface
Click to expand image.

Ceph Pools #5342

A screenshot of a computer
Click to expand image.


References and Credits

1. Prometheus Module - Ceph Documentation, https://docs.ceph.com/en/quincy/mgr/prometheus/

2. Prometheus’s port registry, https://github.com/prometheus/prometheus/wiki/Default-port-allocations

3. 'Ceph Cluster monitoring using Prometheus and Grafana' by Ajinkya Ingole, https://dev.to/ingoleajinkya/ceph-cluster-monitoring-using-prometheus-and-grafana-472i

4. Example script that installs Prom/Grafana/Ceph, https://gist.github.com/kalaspuffar/b0faa4089b7f3920dbafbcedcccbaf16

5. Dashboard Guide - RED HAT CEPH STORAGE 5- Monitoring Ceph Cluster with Ceph Dashboard, https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5/html-single/dashboard_guide/index#doc-wrapper

6. Prometheus Installation Script for Ubuntu 16.04 and 18.04 LTS, https://github.com/petarnikolovski/prometheus-install

7. Grafana Import a Dashboard Instructions, https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/#export-and-import-dashboards