prometheus搭建ceph-jewel(10.2.11版本)的监控
引言:
ceph 10版本还没有mgr组件,到12版本官网才提供了mgr组件,提供了官方的对接zabbix、普罗米修斯的功能。本次部署基于开源的ceph_exporter工具采集ceph集群监控数据。
参考
组件列表
- ceph 10.2.11 :jewel版本
- ceph_exporter:ceph_exporter-2.0.0-1.x86_64.rpm
- prometheus版本:2.37.0
- granafa版本:9.0.4
- dashboard-ID:917
一、ceph_exporter组件
1、安装
wget http://static.zybuluo.com/zphj1987/jiwx305b8q1hwc5uulo0z7ft/ceph_exporter-2.0.0-1.x86_64.rpm
rpm -ivh ceph_exporter-2.0.0-1.x86_64.rpm
systemctl start ceph_exporter
systemctl enable ceph_exporter
这里直接enable会没有提示,需要修改一下service文件,新增如下配置,增加后设置自启动即可
文件名:/usr/lib/systemd/system/ceph_exporter.service
新增内容:
[Install]
WantedBy=multi-user.target
systemctl enable ceph_exporter
Created symlink from /etc/systemd/system/multi-user.target.wants/ceph_exporter.service to /usr/lib/systemd/system/ceph_exporter.service.
2、验证
# netstat -tunlp |grep 9128
tcp6 0 0 :::9128 :::* LISTEN 144381/ceph_exporte
二、prometheus配置文件准备
prometheus+granafa的安装可以参考
https://blog.csdn.net/baidu_35848778/article/details/125204646
job配置
- job_name: ceph
static_configs:
- targets: ['xxx.xx.xx.xx:9128']
labels:
instance: ceph
三、granafa界面
使用import功能新增dashboard,在url处填写917,然后点击load即可在线下载ceph-cluster界面
打开ceph-cluster名称的dashboard即可查看到ceph集群的监控数据