Grafana Ceph Dashboard & Prometheus Integration: Difference between revisions

From OSNEXUS Online Documentation Site
Jump to navigation Jump to search
m took bold off Installing Promet... section to match other sections.
mNo edit summary
Line 1: Line 1:
[[Category:integration_guide]]
[[Category:integration_guide]]


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


''1. Configure your Ceph Cluster using QuantaStor version 6.1 for Focal. Ensure Grafana is installed.''
'''Step 1: Configure Ceph Cluster'''


''Run the following script to install Prometheus and dependencies. This script will also enable Ceph Prometheus Module''.
1. '''Configure your Ceph Cluster''' using QuantaStor version 6.1 or newer. Grafana is installed by default on modern QuantaStor systems.


''2. Running the installer. Enter the following command from a console <u>on one of your Ceph nodes.</u>''
'''Step 2: Install Prometheus'''


'''''install-ceph-prometheus'''''
1. '''Run the installer'''. Enter the following command from a console on one of your Ceph nodes:
  <pre>install-ceph-prometheus</pre>


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


Let us begin the grafana setup now
== Setting Up Grafana ==


''1. Login to Grafana (http://Your Server IP or Host Name:3000) with default username and password as admin''. Click in the 'Toggle Menu' option in the upper left hand side of Grafana to see the menu system.
'''Step 1: Login to Grafana'''


''2. Hover the mouse over the Gear icon and click the ‘data sources’ menu item to add a new Prometheus data source. If the Gear icon is no longer present in your version, then click the 'Add your first data source tile' on the home page.''
1. '''Login to Grafana''': Navigate to [http://YourServerIPorHostName:3000 http://YourServerIPorHostName:3000]


[[image:Ceph-prom-01.PNG|428x975px|Graphical user interface, text
Login with the default credentials of:
<pre>
username: admin
password: admin
</pre>


Description automatically generated]]
On initial login you will be prompted to set a new password.


''3. Click ‘Add data source’ and Select Prometheus''
2. Click the ''''Toggle Menu'''' option in the upper left-hand side of Grafana to see the menu system.


[[image:Ceph-prom-02.PNG|1474x306px|A screenshot of a computer screen
'''Step 2: Add Prometheus Data Source'''


Description automatically generated]]
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.
[[image:Ceph-prom-01.PNG|200px|center|Graphical user interface, text]]


[[image:Ceph-prom-03.PNG|663x525px]]
2. '''Click ‘Add new data source’’' and select Prometheus.


[[image:Ceph-prom-02.PNG|200px|center|A screenshot of a computer screen]]


[[image:Ceph-prom-03.PNG|200px|center]]


''4. Enter URL of Prometheus (node that you ran the 'install-ceph-prometheus' on) and set the HTTP Timeout to 60 and the Scrape Interval to 15s. Click Save & Test.''
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/ 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.


''For example, ''[http://10.0.16.60:9090/ http://10.0.16.60:9090]''. '''Note:''' those dimmed grayed-out default on this page are Grafana’s default suggestions and not actual values, you must enter in a value. Values will be shown in a white font.''
[[image:Ceph-prom-04.PNG|200px|center]]


''[[image:Ceph-prom-04.PNG|871x1059px]]''
After clicking Save & Test, you should see the status:


''After clicking Save & Test you should see the status:''
[[image:Ceph-prom-05.PNG|200px|center|Graphical user interface, text, application]]


''[[image:Ceph-prom-05.PNG|285x92px|Graphical user interface, text, application
'''Step 3: Import Dashboard'''


Description automatically generated]]''
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'''.


[[image:Ceph-prom-06.PNG|200px|center]]


[[image:Ceph-prom-07.PNG|200px|center]]


''5. Hover the mouse over the Dashboards icon, and click on the Import menu item. If the Import menu item is no longer present in the version of Grafana you are using, then click Dashboards in the left-side menu, click New and select Import in the dropdown menu. Enter 7056 in the the 'Import via grafana.com' edit box, click Load.. Enter the Ceph cluster Grafana dashboard id "7056" in the ‘Import via <nowiki>Grafana.com</nowiki>’ field and click Load.''
2. Optionally, change the Name field and select the Ceph Prometheus data source you just added.


''[[image:Ceph-prom-06.PNG|233x436px]]''
[[image:Ceph-prom-08.PNG|200px|center|Graphical user interface, text, application]]


[[image:Ceph-prom-07.PNG|666x571px]]
You have now successfully integrated your Ceph Cluster with Prometheus, Node Exporter, and Grafana!


''6. Optionally change the Name field and select the Ceph Prometheus data source you just added in the previous step.''
[[image:Ceph-prom-09.PNG|200px|center]]


[[image:Ceph-prom-08.PNG|723x765px|Graphical user interface, text, application
'''Additional Dashboards'''


Description automatically generated]]
* '''CephFS #9340'''
 
* '''Ceph - OSD (Single) #5336'''
''Finally, we have successfully integrated our Ceph Cluster with Prometheus, Node Exporter and Grafana!''
* '''Ceph Pools #5342'''
 
[[image:Ceph-prom-09.PNG|913x589px]]
 
====Ceph Cluster #7056====
 
====Using this setup process, you can now monitor your Ceph cluster and import other similar Grafana dashboards.====
 
====Other Ceph Dashboards tested that work following the same import process:====
 
[[image:Ceph-prom-10.PNG|913x474px|Graphical user interface]]
 
====CephFS #9340====
 
[[image:Ceph-prom-11.PNG|915x542px|Graphical user interface]]
 
====Ceph - OSD (Single) #5336====
 
[[image:Ceph-prom-12.PNG|919x475px|A screenshot of a computer]]
 
====Ceph Pools #5342====
 
 
'''References and Credits'''


== References and Credits ==


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

Revision as of 17:15, 12 June 2024


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