美文网首页Ceph分布式存储
⑥ prometheus+grafana监控Ceph集群

⑥ prometheus+grafana监控Ceph集群

作者: Linux丶晨星 | 来源:发表于2020-05-07 18:12 被阅读0次

在新建的主机192.168.0.5

一、安装grafana

1、清华源下载
 [root@ceph-grafana-prometheus ~]# wget https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm/grafana-6.7.3-1.x86_64.rpm
2.安装grafana
rpm -ivh grafana-6.7.3-1.x86_64.rpm
或
yum localinstall grafana-6.7.3-1.x86_64.rpm

3.启动grafana并设为开机自启
systemctl start grafana-server.service 
systemctl enable grafana-server.service
#grafana的默认端口为3000

二、安装prometheus

#1、下载安装包,下载地址
wget https://github.com/prometheus/prometheus/releases/download/v2.18.0/prometheus-2.18.0.linux-amd64.tar.gz
#2、解压压缩包
tar xf prometheus-2.14.0.linux-amd64.tar.gz
#3、将解压后的目录改名
mv prometheus-2.18.0.linux-amd64 /opt/prometheus
#4、查看prometheus版本
cd /opt/prometheus/
./prometheus --version
prometheus, version 2.18.0
#5、配置系统服务启动
vim /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Monitoring System
Documentation=Prometheus Monitoring System

[Service]
ExecStart=/opt/prometheus/prometheus \
  --config.file /opt/prometheus/prometheus.yml \
  --web.listen-address=:9090

[Install]
WantedBy=multi-user.target
#6、加载系统服务
systemctl daemon-reload
#7、启动服务和添加开机自启动
systemctl restart prometheus
systemctl enable prometheus
#8、访问
http://192.168.0.5:9090

三、ceph mgr prometheus插件配置

在cephnode01上配置

#启动prometheus模块
ceph mgr module enable prometheus
#检查端口
netstat -nltp | grep mgr 
ceph -s (mgr在cephnode03上)
#测试返回值
curl 192.168.0.8:9283/metrics  
#访问
http://192.168.0.8:9283/metrics

四、配置prometheus

1、在 scrape_configs: 配置项下添加

#每个job_name要分开
vim prometheus.yml
  - job_name: 'ceph_cluster'
    honor_labels: true
    scrape_interval: 5s
    static_configs:
      - targets: ['192.168.0.8:9283']
        labels:
          instance: ceph

2、重启prometheus服务

systemctl restart prometheus

3、检查prometheus服务器中是否添加成功

浏览器-》 http://x.x.x.x:9090 -》status -》Targets

五、配置grafana

1、浏览器登录 grafana 管理界面

http://192.168.0.5:3000/

2、添加data sources,点击configuration--》data sources

3、添加dashboard,点击HOME--》find dashboard on grafana.com

4、搜索ceph的dashboard

5、点击HOME--》Import dashboard, 选择合适的dashboard,记录编号

6、检测成功

7、也可以检测Cephfs文件系统

相关文章

  • Ceph集群监控Prometheus+Grafana

    Ceph是一个分布式存储系统。同时Ceph除了能提供块存储,还可以提供文件存储、对象存储。 这里不介绍如何搭建Ce...

  • ⑥ prometheus+grafana监控Ceph集群

    在新建的主机192.168.0.5上 一、安装grafana 二、安装prometheus 三、ceph mgr ...

  • ceph命令

    ceph集群的监控检查集群的健康情况 # ceph health # ceph health detail 得到集...

  • Ceph 集群状态监控细化

    需求在做Ceph的监控报警系统时,对于Ceph集群监控状态的监控,最初只是简单的OK、WARN、ERROR,按照C...

  • MySQL部署到k8s实例

    k8s && ceph 环境信息 ceph 部署以及配置 搭建ceph集群 ceph 集群配置 ceph 创建My...

  • (一) Ceph集群环境准备

    Ceph集群环境准备 基于本机搭建ceph集群及cephfs、cephrgw、cephrbd服务。 集群规划 生产...

  • ceph 简介

    ceph:对象存储、块设备、文件系统... ceph存储集群的部署都始于一个个ceph节点,网络,ceph存储集群...

  • jvm-exporter整合k8s+prometheus监控报警

    文章背景:使用Prometheus+Grafana监控JVM[https://chanjarster.github...

  • Ceph I / O

    介绍 Ceph客户端接口从Ceph存储集群读取数据并将数据写入Ceph存储集群。客户端需要以下数据才能与Ceph存...

  • Ceph Cookbook 中文版

    1、ceph介绍、ceph块存储、ceph对象存储、ceph文件系统、用Calamari监控Ceph、操作和管理c...

网友评论

    本文标题:⑥ prometheus+grafana监控Ceph集群

    本文链接:https://www.haomeiwen.com/subject/hciaghtx.html