Ceph Mimic - 启用Dashboard功能

Ceph 的监控可视化界面方案很多----grafana、Kraken。但是从Luminous开始,Ceph 提供了原生的Dashboard功能,通过Dashboard可以获取Ceph集群的各种基本状态信息。

1.查看ceph状态

[root@controller ~]# ceph -s
  cluster:
    id:     25dae5c3-3fa7-44a4-9f35-7f0b288e26c9
    health: HEALTH_OK
 
  services:
    mon: 3 daemons, quorum node1,node2,node3
    mgr: node1(active), standbys: node2, node3
    mds: cephfs-1/1/1 up  {0=node1=up:active}
    osd: 3 osds: 2 up, 2 in
    rgw: 2 daemons active
 
  data:
    pools:   7 pools, 168 pgs
    objects: 257  objects, 136 MiB
    usage:   2.3 GiB used, 7.7 GiB / 10 GiB avail
    pgs:     168 active+clean

2.启用

[root@controller ~]# ceph mgr module enable dashboard
[root@controller ~]# ceph-deploy mgr create node1
[root@controller ~]# ceph mgr module enable dashboard

3.生成并安装一个 自签名证书

[root@node1 ~]# ceph dashboard create-self-signed-cert
Self-signed certificate created

4.生成密钥,生成两个文件----dashboard.crt  dashboard.key 

mkdir mgr-dashboard

cd mgr-dashboard

openssl req -new -nodes -x509   -subj "/O=IT/CN=ceph-mgr-dashboard" -days 3650   -keyout dashboard.key -out dashboard.crt -extensions v3_ca

 5.配置服务地址、端口,默认的端口是8443

[root@node1 mgr-dashboard]# ceph config set mgr mgr/dashboard/server_addr 192.168.236.131
[root@node1 mgr-dashboard]# ceph config set mgr mgr/dashboard/server_port 8443
[root@node1 mgr-dashboard]# ceph mgr services
{
    "dashboard": "https://node1:8443/"
}

6.创建一个用户、密码

[root@node1 mgr-dashboard]# ceph dashboard set-login-credentials admin admin

 7.重启

[root@node1 ~]# systemctl restart ceph-mgr@node1

8.访问:https://ip:8443

Ceph Mimic - 启用Dashboard功能_第1张图片

Ceph Mimic - 启用Dashboard功能_第2张图片

参考方案:

1.http://docs.ceph.com/docs/master/mgr/dashboard/

2.http://www.yangguanjun.com/2018/09/15/ceph-mimic-dashboard-intro/

你可能感兴趣的:(运维)