Ceph Dashboard集成Prometheus¶
Ceph Dashboard使用了 Grafana通用可视分析平台 面板来实现RBD监控,数据源是从 Prometheus监控 拉取数据,Ceph Prometheus Module 采用Prometheus输出格式输出(export)数据,然后由Grafana面板从Prometheus模块和 Node exporter获取metrics名字。
安装和配置¶
Prometheus¶
在我的 私有云架构 规划中,最初想采用如下独立服务器部署Prometheus,不过最终我改为集成化 Kubernetes集群(z-k8s)部署Prometheus-stack
z-b-mon-1上 Prometheus快速起步 部署Ceph集群的3个节点
z-b-data-1/z-b-data-2/z-b-data-3安装并运行 Node Exporterz-b-mon-1上 安装Grafana 并 Grafana配置快速起步
激活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'