Ceph Dashboard集成Prometheus¶
Ceph Dashboard使用了 Grafana通用可视分析平台 面板来实现RBD监控,数据源是从 Prometheus监控 拉取数据,Ceph Prometheus Module 采用Prometheus输出格式输出(export)数据,然后由Grafana面板从Prometheus模块和 Node exporter获取metrics名字。
安装和配置¶
Prometheus¶
在我的 私有云架构 规划中,采用 私有云Prometheus部署 部署架构
z-b-mon-1
上 Prometheus快速起步 部署Ceph集群的3个节点
z-b-data-1
/z-b-data-2
/z-b-data-3
安装并运行 Prometheus Node Exporter
激活Prometheus输出¶
使用以下命令激活 prometheus 模块:
sudo ceph mgr module enable prometheus
默认Ceph Prometheus模块会监听在所有网络接口的 9283
端口,即以下配置命令是默认设置:
ceph config set mgr mgr/prometheus/server_addr 0.0.0.0
ceph config set mgr mgr/prometheus/server_port 9283
你可以通过上述命令修订监听IP地址和端口
配置Prometheus¶
修订
z-b-mon-1
配置/etc/prometheus/promethesu.yaml
添加:scrape_configs: - job_name: 'ceph' honor_labels: true static_configs: - targets: ['z-b-data-1:9283'] labels: instance: 'ceph_cluster' - targets: ['z-b-data-2:9283'] labels: instance: 'ceph_cluster' - targets: ['z-b-data-3:9283'] labels: instance: 'ceph_cluster'