(12)使用prometheus+Grafana监控ceph 集群

发布时间:2020-06-07 18:40:15 作者:TangYGao
来源:网络 阅读:957

在Ceph Luminous之前的版本,可以使用第三方的Prometheus exporterceph_exporter。 Ceph Luminous 12.2.1的mgr中自带了Prometheus插件,内置了 Prometheus ceph exporter,可以使用Ceph mgr内置的exporter作为Prometheus的target。

(1)环境介绍

shell> ceph -v
ceph version 14.2.4 nautilus (stable)

(2)环境准备

① grafana部署
shell> yum -y install grafana
shell> rpm -qa | grep grafana
grafana-6.3.6-1.x86_64
shell> netstat -tunlp | grep grafana #监听3000端口
http://10.10.204.38:3000 默认密码admin admin

② prometheus server 部署
查看该链接部署https://blog.51cto.com/7603402/2444837

(3)使用ceph mgr prometheus插件

①找到mgr active 主机
shell> ceph -s
mgr: admin(active, since 107m), standbys: node140

② 在ceph mgr admin节点上启动插件
shell>ceph mgr module enable prometheus

③查看插件是否启动
shell>netstat -nltp | grep mgr
tcp6 0 0 :::9283 :::* LISTEN 59954/ceph-mgr

④检查是否已经获取到数据
shell> curl 127.0.0.1:9283/metrics #可以看到大量的返回值

(4)配置prometheus server 添加ceph集群 job

shell>vim prometheus.yml
#在scrape_configs: 配置项下添加,注意空格按yml 2 4 6 8 空格的规则

  - job_name: 'ceph_cluster'
    honor_labels: true
    scrape_interval: 5s
    static_configs:
      - targets: ['10.10.202.142:9283']
        labels:
          instance: ceph

① 重启prometheus 服务
shell>systemctl restart prometheus

② 检查prometheus服务器中是否添加成功
浏览器-》 http://x.x.x.x:9090 -》status -》Targets

(12)使用prometheus+Grafana监控ceph 集群

(5)grafana添加展示

①浏览器登录 grafana 管理界面
②添加data sources ,点击configuration--》data sources
(12)使用prometheus+Grafana监控ceph 集群
③ 添加dashboard

点击HOME--》find dashboard on grafana.com
(12)使用prometheus+Grafana监控ceph 集群

④ 搜索ceph的dashboard
(12)使用prometheus+Grafana监控ceph 集群
⑤ 选择合适的dashboard,记录编号
(12)使用prometheus+Grafana监控ceph 集群

⑥ Import dashboard 再选导入模板,输入编号
(12)使用prometheus+Grafana监控ceph 集群

(12)使用prometheus+Grafana监控ceph 集群

⑦ 漂亮的dashboard即可展现出来了:
(12)使用prometheus+Grafana监控ceph 集群

推荐阅读:
  1. ceph 集群安装
  2. 使用ceph-deploy搭建三节点ceph集群

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

prometheus grafana gr eu

上一篇:ORACLE JET BASIC TABLE

下一篇:Nginx反向代理apache及Nginx

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》