Grafana Ceph Dashboard & Prometheus Integration: Difference between revisions

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


== 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.


'''Installing Prometheus, Node Exporter and Enabling Ceph Prometheus Module'''
'''Step 2: Install Prometheus'''


''Run the following script to install Prometheus and dependencies. This script will also enable Ceph Prometheus Module''.
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 the Ceph Prometheus Module.


== Setting Up Grafana ==


''1. Running the installer. Enter the following line from a console on one of your Ceph nodes.''
'''Step 1: Login to Grafana'''


1. '''Login to Grafana''': Navigate to [http://YourServerIPorHostName:3000 http://YourServerIPorHostName:3000]


Login with the default credentials of:
<pre>
username: admin
password: admin
</pre>


'''''install-ceph-prometheus'''''
On initial login you will be prompted to set a new password.


====You have now successfully installed Prometheus, Node Exporter and Enabled Ceph Prometheus Module====
2. Click the ''''Toggle Menu'''' option in the upper left-hand side of Grafana to see the menu system.


Let us begin the grafana setup now
'''Step 2: Add Prometheus Data Source'''


''1. Login to Grafana (http://Your Server IP or Host Name:3000) with default username and password as admin''
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.''


''2. Hover the mouse over the Gear icon and click the ‘data sources’ menu item to add a new Prometheus data source''
2. '''Click ‘Add new data source’’' and select Prometheus.


[[image:Ceph-prom-01.PNG|428x975px|Graphical user interface, text
[[image:Ceph-prom-02.PNG|700px|A screenshot of a computer screen]]<br/>''Click to expand image.''


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


''3. Click ‘Add data source’ and Select Prometheus''
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.


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


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


[[image:Ceph-prom-03.PNG|663x525px]]
After clicking Save & Test, you should see the status:


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


'''Step 3: Import Dashboard'''


''4. Enter URL of Prometheus and set the HTTP Timeout to 60 and the Scrape Interval to 15s. Click Save & Test.''
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.


''For example, ''[http://localhost:9090/ http://localhost: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-06.PNG|500px]]<br/>''Click to expand image.''


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


''After clicking Save & Test you should see the status:''
2. Optionally, change the Name field and select the Ceph Prometheus data source you just added.


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


Description automatically generated]]''
You have now successfully integrated your Ceph Cluster with Prometheus, Node Exporter, and Grafana!


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


 
'''Additional Dashboards'''
''5. Hover the mouse over the Dashboards icon, and click on the Import menu item. Enter the Ceph cluster Grafana dashboard id "7056" in the ‘Import via <nowiki>Grafana.com</nowiki>’ field and click Load.''
 
''[[image:Ceph-prom-06.PNG|233x436px]]''
 
[[image:Ceph-prom-07.PNG|666x571px]]
 
''6. Optionally change the Name field and select the Ceph Prometheus data source you just added in the previous step.''
 
[[image:Ceph-prom-08.PNG|723x765px|Graphical user interface, text, application
 
Description automatically generated]]
 
''Finally, we have successfully integrated our Ceph Cluster with Prometheus, Node Exporter and Grafana!''
 
[[image:Ceph-prom-09.PNG|913x589px]]
 
====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 102:
''4. Example script that installs Prom/Grafana/Ceph, <nowiki>https://gist.github.com/kalaspuffar/b0faa4089b7f3920dbafbcedcccbaf16</nowiki>''
''4. Example script that installs Prom/Grafana/Ceph, <nowiki>https://gist.github.com/kalaspuffar/b0faa4089b7f3920dbafbcedcccbaf16</nowiki>''


''5. Prometheus Installation Script for Ubuntu 16.04 and 18.04 LTS, <nowiki>https://github.com/petarnikolovski/prometheus-install</nowiki>''
''5. Dashboard Guide - RED HAT CEPH STORAGE 5- Monitoring Ceph Cluster with Ceph Dashboard, <nowiki>https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5/html-single/dashboard_guide/index#doc-wrapper</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