Grafana Ceph Dashboard & Prometheus Integration

From OSNEXUS Online Documentation Site
Revision as of 17:15, 12 June 2024 by Qadmin (talk | contribs)
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 releeases, the data sources page is under the gear icon in the left hand menu.
Graphical user interface, text
Graphical user interface, text

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

A screenshot of a computer screen
A screenshot of a computer screen

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

  * Set the HTTP Timeout to 60 and the Scrape Interval to 15s.
  * Click Save & Test.
  * For example, use http://10.0.16.60:9090/.
  * Note: those dimmed grayed-out default values on this page are Grafana’s default suggestions and not actual values; you must enter a value. Values will be shown in a white font.
File:Ceph-prom-04.PNG

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

Graphical user interface, text, application
Graphical user interface, text, application

Step 3: Import Dashboard

1. Import Ceph Cluster Grafana dashboard:

  * Hover the mouse over the Dashboards icon and click on the Import menu item.
  * If the Import menu item is no longer present, 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.

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

Graphical user interface, text, application
Graphical user interface, text, application

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

Additional Dashboards

  • CephFS #9340
  • Ceph - OSD (Single) #5336
  • Ceph Pools #5342

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