Ceph Dashboard 可视化
Ceph Dashboard 可视化
Ceph Dashboard
Ceph 的监控可视化界面方案很多----grafana、Kraken。但是从Luminous开始,Ceph 提供了原生的Dashboard功能,通过Dashboard可以获取Ceph集群的各种基本状态信息。
mimic版 (nautilus版) dashboard 安装。如果是 (nautilus版) 需要安装 ceph-mgr-dashboard
这个ceph dashbord可以看 pool pg,然后集群的状态信息都可以看到,随着nautilus版本出来,功能更加丰富了,很多日常的工作都可以去上面做
1、配置Ceph Dashboard
这里查看mgr里面的模块开启和关闭状态
[root@cephnode01 ~]# ceph -s cluster: id: 406e0c23-755f-4378-bbc9-13548c4d3d64 health: HEALTH_OK services: mon: 3 daemons, quorum cephnode01,cephnode02,cephnode03 (age 14m) mgr: cephnode03(active, since 14m), standbys: cephnode02, cephnode01 mds: 3 up:standby osd: 3 osds: 3 up (since 14m), 3 in (since 2w) rgw: 1 daemon active (cephnode01) task status: data: pools: 4 pools, 128 pgs objects: 187 objects, 1.2 KiB usage: 3.0 GiB used, 12 GiB / 15 GiB avail pgs: 128 active+clean[root@cephnode01 ~]# ceph mgr module ls | more{ "always_on_modules": [ "balancer", "crash", "devicehealth", "orchestrator_cli", "progress", "rbd_support", "status", "volumes" ], "enabled_modules": [ "iostat", "restful" ],
1、在每个mgr节点安装
[root@cephnode01 ~]# yum install ceph-mgr-dashboard -y[root@cephnode02 ~]# yum install ceph-mgr-dashboard -y[root@cephnode03 ~]# yum install ceph-mgr-dashboard -y[root@cephnode01 ~]# ceph mgr module ls | grep "dashboard" -a20"name": "dashboard", "can_run": true, "error_string": "", "module_options": { "ALERTMANAGER_API_HOST": { "name": "ALERTMANAGER_API_HOST", "type": "str", "level": "advanced", "flags": 0, "default_value": "", "min": "", "max": "", "enum_allowed": [], "desc": "", "long_desc": "", "tags": [], "see_also": [] },
2、开启mgr功能
[root@cephnode02 ~]# ceph mgr module enable dashboard
3、生成并安装自签名的证书
[root@cephnode01 ~]# ceph dashboard create-self-signed-cert Self-signed certificate created
4、创建一个dashboard登录用户名密码
用户名test 密码123456[root@cephnode01 ~]# ceph dashboard ac-user-create test administrator -i ceph.txt {"username": "test", "lastUpdate": 1620636786, "name": null, "roles": ["administrator"], "password": "$2b$12$CjagieJjtXpt3ElcHs1VmOYx2XHkOuvYl1Ng9ra9Z5odeqH4CXY6G", "email": null}[root@cephnode01 ~]# cat ceph.txt 123456
5、禁用ssl,公司内部使用可以关闭
[root@cephnode01 ~]# ceph config set mgr mgr/dashboard/ssl false
6、查看服务访问方式
[root@cephnode01 ~]# ceph mgr services{ "dashboard": "~]# ceph config set mgr mgr/dashboard/server_port 7000指定集群 dashboard的访问IP[root@cephnode01 ~]# ceph config set mgr mgr/dashboard/server_addr 192.168.179.104[root@cephnode01 ~]# telnet 192.168.179.104 22Trying 192.168.179.104...Connected to 192.168.179.104.Escape character is '^]'.SSH-2.0-OpenSSH_7.4^C^C^C^C^C^C^C^C^CConnection closed by foreign host.[root@cephnode01 ~]# [root@cephnode01 ~]# telnet 192.168.179.104 7000Trying 192.168.179.104...telnet: connect to address 192.168.179.104: Connection refused生效需要一点时间[root@cephnode03 ~]# ceph mgr services{ "dashboard": "~]# radosgw-admin user create --uid=user01 --display-name=user01 --system{ "user_id": "user01", "display_name": "user01", "email": "", "suspended": 0, "max_buckets": 1000, "subusers": [], "keys": [ { "user": "user01", "access_key": "YN20C83EE5F83VE1PY31", "secret_key": "IStDC3Tq2BANS7EVwgY7iagFkmCp7AzgVeQc8Qiq" } ], "swift_keys": [], "caps": [], "op_mask": "read, write, delete", "system": "true", "default_placement": "", "default_storage_class": "", "placement_tags": [], "bucket_quota": { "enabled": false, "check_on_raw": false, "max_size": -1, "max_size_kb": 0, "max_objects": -1 }, "user_quota": { "enabled": false, "check_on_raw": false, "max_size": -1, "max_size_kb": 0, "max_objects": -1 }, "temp_url_keys": [], "type": "rgw", "mfa_ids": []} "access_key": "YN20C83EE5F83VE1PY31", "secret_key": "IStDC3Tq2BANS7EVwgY7iagFkmCp7AzgVeQc8Qiq"
现在为dashboard这个接口提供这两个key去访问,那么就可以看到一些功能了
[root@cephnode01 ~]# echo YN20C83EE5F83VE1PY31 > access.key[root@cephnode01 ~]# ceph dashboard set-rgw-api-access-key -i access.key Option RGW_API_ACCESS_KEY updated[root@cephnode01 ~]# echo IStDC3Tq2BANS7EVwgY7iagFkmCp7AzgVeQc8Qiq > secret.key[root@cephnode01 ~]# ceph dashboard set-rgw-api-secret-key -i secret.key Option RGW_API_SECRET_KEY updated
3、配置rgw主机名和端口
[root@cephnode01 ~]# netstat -tpln | grep 7480tcp 0 0 0.0.0.0:7480 0.0.0.0:* LISTEN 815/radosgw tcp6 0 0 :::7480 :::* LISTEN 815/radosgw [root@cephnode01 ~]# ceph dashboard set-rgw-api-host 192.168.179.102Option RGW_API_HOST updated[root@cephnode01 ~]# ceph dashboard set-rgw-api-port 7480Option RGW_API_PORT updated
4、刷新web页面
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~