Grafana Ceph Dashboard & Prometheus Integration: Difference between revisions

From OSNEXUS Online Documentation Site
Jump to navigation Jump to search
mNo edit summary
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:integration_guide]]
[[Category:integration_guide]]


'''Installing Prometheus, Node Exporter and Enabling Ceph Prometheus Module on Focal'''
== Installing Prometheus, Node Exporter, and Enabling the Ceph Prometheus Module ==


''1. Configure your Ceph Cluster using QuantaStor version 6.1 for Focal.''
'''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''
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 releases, the data sources page is under the gear icon in the left hand menu.
[[image:Ceph-prom-01.PNG|800px|Graphical user interface, text]]<br/>''Click to expand image.''


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


[[image:Ceph-prom-02.PNG|700px|A screenshot of a computer screen]]<br/>''Click to expand image.''


[[image:Ceph-prom-03.PNG|300px]]<br/>''Click to expand image.''


''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):
  * 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/ 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.


''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-04a.PNG|600px]]<br/>''Click to expand image.''


''[[image:Ceph-prom-04.PNG|871x1059px]]''
[[image:Ceph-prom-04b.PNG|500px]]<br/>''Click to expand image.''


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


''[[image:Ceph-prom-05.PNG|285x92px|Graphical user interface, text, application
[[image:Ceph-prom-05.PNG|500px|Graphical user interface, text, application]]<br/>''Click to expand image.''


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


[[image:Ceph-prom-06.PNG|500px]]<br/>''Click to expand image.''


''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.''
[[image:Ceph-prom-07.PNG|500px]]<br/>''Click to expand image.''


''[[image:Ceph-prom-06.PNG|233x436px]]''
2. Optionally, change the Name field and select the Ceph Prometheus data source you just added.


[[image:Ceph-prom-07.PNG|666x571px]]
[[image:Ceph-prom-08.PNG|300px|Graphical user interface, text, application]]<br/>''Click to expand image.''


''6. Optionally change the Name field and select the Ceph Prometheus data source you just added in the previous step.''
You have now successfully integrated your Ceph Cluster with Prometheus, Node Exporter, and Grafana!


[[image:Ceph-prom-08.PNG|723x765px|Graphical user interface, text, application
[[image:Ceph-prom-09.PNG|300px]]<br/>''Click to expand image.''


Description automatically generated]]
'''Additional Dashboards'''
 
''Finally, we have successfully integrated our Ceph Cluster with Prometheus, Node Exporter and Grafana!''
 
[[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:====
====Other Ceph Dashboards tested that work following the same import process:====
[[image:Ceph-prom-10.PNG|913x474px|Graphical user interface]]


====CephFS #9340====
====CephFS #9340====
 
[[image:Ceph-prom-10.PNG|300px|Graphical user interface]]<br/>''Click to expand image.''
[[image:Ceph-prom-11.PNG|915x542px|Graphical user interface]]


====Ceph - OSD (Single) #5336====
====Ceph - OSD (Single) #5336====
 
[[image:Ceph-prom-11.PNG|300px|Graphical user interface]]<br/>''Click to expand image.''
[[image:Ceph-prom-12.PNG|919x475px|A screenshot of a computer]]


====Ceph Pools #5342====
====Ceph Pools #5342====
[[image:Ceph-prom-12.PNG|300px|A screenshot of a computer]]<br/>''Click to expand image.''




'''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>''
Line 96: Line 105:


''6. Prometheus Installation Script for Ubuntu 16.04 and 18.04 LTS, <nowiki>https://github.com/petarnikolovski/prometheus-install</nowiki>''
''6. Prometheus Installation Script for Ubuntu 16.04 and 18.04 LTS, <nowiki>https://github.com/petarnikolovski/prometheus-install</nowiki>''
''7. Grafana Import a Dashboard Instructions, <nowiki>https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/#export-and-import-dashboards</nowiki>''

Latest revision as of 18:31, 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 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