安装Dashboard
yum install -y ceph-mgr-dashboard -y
开启插件
ceph mgr module enable dashboard
禁用SSL。
ceph config set mgr mgr/dashboard/ssl false
配置监听IP。
ceph config set mgr mgr/dashboard/server_addr 0.0.0.0
温馨提醒
此处必须设置监控地址为0.0.0.0,而不能是直接IP地址,因为其监控的是所有本地地址包括IPV4和IPV6,同时也不能禁用IPV6地址。
#配置监听端口。
[root@ceph-node01 ceph-deploy]# ceph config set mgr mgr/dashboard/server_port 8444
设置用户及密码。
[root@ceph-node01 ceph-deploy]# ceph dashboard ac-user-create admin 123456 administrator
{"username": "admin", "lastUpdate": 1605177808, "name": null, "roles": ["administrator"], "password": "$2b$12$kJnehyIaGpCXP.vl4wDE4un6Fy8PpioFJltIfiSqr9cuSq5YiWbe6", "email": null}
使用配置生效。
ceph mgr module disable dashboard
ceph mgr module enable dashboard
通过查看ceph mgr services命令输出地址。
[root@ceph-node01 ceph-deploy]# ceph mgr services
{
"dashboard": "http://ceph-node01:8444/"
}
开启prometheus监控
[root@ceph-node01 ceph-deploy]# ceph mgr module enable prometheus
[root@ceph-node01 ceph-deploy]# ceph mgr services
{
"dashboard": "http://ceph-node01:8444/",
"prometheus": "http://ceph-node01:9283/"
}
访问Ceph Dashboard地址http://192.168.123.199:8444/
prometheus
vim /opt/prometheus/prometheus1.yml 添加以下
- job_name: 'ceph'
static_configs:
- targets: ['192.168.8.100:9283']
grafana 模板引入
2842