日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

构建ceph可视化监控(prometheu+grafana)

發(fā)布時間:2023/12/8 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 构建ceph可视化监控(prometheu+grafana) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

快速構(gòu)建ceph可視化監(jiān)控系統(tǒng)(在任意mon節(jié)點安裝)

前言

ceph的可視化方案很多,本篇介紹的是比較簡單的一種方式,并且對包都進行了二次封裝,所以能夠在極短的時間內(nèi)構(gòu)建出一個可視化的監(jiān)控系統(tǒng)

本系統(tǒng)組件如下:

  • ceph-jewel版本
  • ceph_exporter的jewel版本
  • prometheus的2.3.2版本
  • grafana的grafana-5.3.0版本
  • 適配的系統(tǒng)為centos7

資源如下:

http://static.zybuluo.com/zphj1987/jiwx305b8q1hwc5uulo0z7ft/ceph_exporter-2.0.0-1.x86_64.rpm
http://static.zybuluo.com/zphj1987/7ro7up6r03kx52rkwy1qjuwm/prometheus-2.3.2-1.x86_64.rpm
https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.1-1.x86_64.rpm
http://static.zybuluo.com/zphj1987/1nu2k4cpcery94q2re3u6s1t/ceph-cluster_rev1.json

以上資源均可以直接用wget進行下載,然后直接安裝(本地源中tools目錄也有 可以直接下載)

監(jiān)控的架構(gòu)介紹

通過ceph_exporter抓取的ceph相關(guān)的數(shù)據(jù)并且在本地監(jiān)聽端口9128端口
prometheus抓取ceph_exporter的9128的端口的數(shù)據(jù)存儲在本地的/var/lib/prometheus/目錄下面
grafana抓取prometheus的數(shù)據(jù)進行渲染成web頁面
頁面的模板就是使用的grafana的ceph模板插件
那么我們就根據(jù)上面的架構(gòu)去一步步的把系統(tǒng)配置起來

配置監(jiān)控系統(tǒng)

安裝ceph_exporter

[root@ceph-node2 ~]# ls ceph_exporter-2.0.0-1.x86_64.rpm grafana-5.3.0-1.x86_64.rpm prometheus-2.3.2-1.x86_64.rpm [root@ceph-node2 ~]# rpm -qpl ceph_exporter-2.0.0-1.x86_64.rpm /usr/bin/ceph_exporter /usr/lib/systemd/system/ceph_exporter.service [root@ceph-node2 ~]# rpm -ivh ceph_exporter-2.0.0-1.x86_64.rpm 準(zhǔn)備中... ################################# [100%] 正在升級/安裝...1:ceph_exporter-2:2.0.0-1 ################################# [100%] [root@ceph-node2 ~]# systemctl start ceph_exporter [root@ceph-node2 ~]# systemctl enable ceph_exporter [root@ceph-node2 ~]# netstat -utpln |grep 9128 tcp6 0 0 :::9128 :::* LISTEN 30641/ceph_exporter
可以看到端口起來了就是安裝成功了,這個ceph_exporter建議是安裝在管理節(jié)點上,也就是能夠執(zhí)行出ceph -s的節(jié)點上面的

安裝prometheus

[root@ceph-node2 ~]# rpm -qpl prometheus-2.3.2-1.x86_64.rpm /etc/ceph/prometheus.yml /usr/bin/prometheus /usr/lib/systemd/system/prometheus.service [root@ceph-node2 ~]# rpm -ivh prometheus-2.3.2-1.x86_64.rpm 準(zhǔn)備中... ################################# [100%] 正在升級/安裝...1:prometheus-2:2.3.2-1 ################################# [100%] [root@ceph-node2 ~]# systemctl start prometheus [root@ceph-node2 ~]# netstat -utpln |grep 9090 tcp6 0 0 :::9090 :::* LISTEN 30750/prometheus
這個地方默認是認為prometheus和ceph_exporter在一臺機器上面,所以配置文件的/etc/ceph/prometheus.yml里面的targets寫的是127.0.0.1,如果不同機器,需要修改成exporter ip地址
prometheus的默認監(jiān)聽端口為9090,到這個時候直接去web 上面就可以看到prometheus的抓取的數(shù)據(jù)了

到這里是數(shù)據(jù)到prometheus的已經(jīng)完成了,下面就去做跟grafana相關(guān)的配置了

安裝grafana

[root@ceph-node2 ~]# yum localinstall grafana-5.3.0-1.x86_64.rpm [root@ceph-node2 ~]# systemctl start grafana-server.service [root@ceph-node2 ~]# netstat -tunlp|grep gra Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp6 0 0 :::3000 :::* LISTEN 31164/grafana-serve
grafana默認監(jiān)聽的3000的端口

默認登陸的用戶名密碼為admin admin,登陸成功后會強制修改密碼

配置grafana



這里如果能上網(wǎng)就直接輸入id 917 ,如果不能上網(wǎng)就把上面的ceph-cluster_rev1.json文件弄到本地去,導(dǎo)入進去即可


監(jiān)控配置完成

總結(jié)

以上是生活随笔為你收集整理的构建ceph可视化监控(prometheu+grafana)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。