Difference between revisions of "Grafana Ceph Dashboard & Prometheus Integration"
(Created page with "Category:integration_guide") |
m |
||
Line 1: | Line 1: | ||
[[Category:integration_guide]] | [[Category:integration_guide]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | '''Installing Prometheus, Node Exporter and Enabling Ceph Prometheus Module''' | ||
+ | |||
+ | ''Run the following script to install Prometheus and dependencies. This script will also enable Ceph Prometheus Module''. | ||
+ | |||
+ | |||
+ | |||
+ | ''1. Running the installer. Enter the following line from a console on one of your Ceph nodes.'' | ||
+ | |||
+ | |||
+ | |||
+ | '''''install-ceph-prometheus''''' | ||
+ | |||
+ | ====You have now successfully installed Prometheus, Node Exporter and Enabled Ceph Prometheus Module==== | ||
+ | |||
+ | Let us begin the grafana setup now | ||
+ | |||
+ | ''1. Login to Grafana (http://Your Server IP or Host Name:3000) with default username and password as admin'' | ||
+ | |||
+ | ''2. Hover the mouse over the Gear icon and click the ‘data sources’ menu item to add a new Prometheus data source'' | ||
+ | |||
+ | [[image:Ceph-prom-01.PNG|428x975px|Graphical user interface, text | ||
+ | |||
+ | Description automatically generated]] | ||
+ | |||
+ | ''3. Click ‘Add data source’ and Select Prometheus'' | ||
+ | |||
+ | [[image:Ceph-prom-02.PNG|1474x306px|A screenshot of a computer screen | ||
+ | |||
+ | Description automatically generated]] | ||
+ | |||
+ | [[image:Ceph-prom-03.PNG|663x525px]] | ||
+ | |||
+ | |||
+ | |||
+ | ''4. Enter URL of Prometheus and set the HTTP Timeout to 60 and the Scrape Interval to 15s. Click Save & Test.'' | ||
+ | |||
+ | ''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-04.PNG|871x1059px]]'' | ||
+ | |||
+ | ''After clicking Save & Test you should see the status:'' | ||
+ | |||
+ | ''[[image:Ceph-prom-05.PNG|285x92px|Graphical user interface, text, application | ||
+ | |||
+ | Description automatically generated]]'' | ||
+ | |||
+ | |||
+ | |||
+ | ''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:==== | ||
+ | |||
+ | [[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''' | ||
+ | |||
+ | |||
+ | ''1. Prometheus Module - Ceph Documentation, <nowiki>https://docs.ceph.com/en/quincy/mgr/prometheus/</nowiki>'' | ||
+ | |||
+ | ''2. Prometheus’s port registry, <nowiki>https://github.com/prometheus/prometheus/wiki/Default-port-allocations</nowiki>'' | ||
+ | |||
+ | ''3. 'Ceph Cluster monitoring using Prometheus and Grafana' by Ajinkya Ingole, <nowiki>https://dev.to/ingoleajinkya/ceph-cluster-monitoring-using-prometheus-and-grafana-472i</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>'' |
Revision as of 19:37, 24 February 2023
Installing Prometheus, Node Exporter and Enabling Ceph Prometheus Module
Run the following script to install Prometheus and dependencies. This script will also enable Ceph Prometheus Module.
1. Running the installer. Enter the following line from a console on one of your Ceph nodes.
install-ceph-prometheus
Contents
- 1 You have now successfully installed Prometheus, Node Exporter and Enabled Ceph Prometheus Module
- 2 Using this setup process, you can now monitor your Ceph cluster and import other similar Grafana dashboards.
- 3 Other Ceph Dashboards tested that work following the same import process:
- 4 CephFS #9340
- 5 Ceph - OSD (Single) #5336
- 6 Ceph Pools #5342
You have now successfully installed Prometheus, Node Exporter and Enabled Ceph Prometheus Module
Let us begin the grafana setup now
1. Login to Grafana (http://Your Server IP or Host Name:3000) with default username and password as admin
2. Hover the mouse over the Gear icon and click the ‘data sources’ menu item to add a new Prometheus data source
3. Click ‘Add data source’ and Select Prometheus
4. Enter URL of Prometheus and set the HTTP Timeout to 60 and the Scrape Interval to 15s. Click Save & Test.
For example, 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.
After clicking Save & Test you should see the status:
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 Grafana.com’ field and click Load.
6. Optionally change the Name field and select the Ceph Prometheus data source you just added in the previous step.
Finally, we have successfully integrated our Ceph Cluster with Prometheus, Node Exporter and Grafana!
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:
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. Prometheus Installation Script for Ubuntu 16.04 and 18.04 LTS, https://github.com/petarnikolovski/prometheus-install