「Ceph」- 监控、日志、告警

  CREATED BY JENKINSBOT

常用监控命令

需要查看的对象有:MON OSD MDS PG;RBD RADOSGW GEPHFS Client;

Cluster

# ceph health
HEALTH_OK

# ceph health detail
HEALTH_OK

# ceph -w 
# ceph -s
# watch -n 1 ceph -s

# ceph status
  cluster:
    id:     cf79beac-61eb-11ed-a2e0-080027d3c643
    health: HEALTH_OK
 
  services:
    mon: 3 daemons, quorum ceph-node-01,ceph-node-02,ceph-node-03 (age 22h)
    mgr: ceph-node-02.gktsek(active, since 22h), standbys: ceph-node-01.ymsncp
    mds: 1/1 daemons up, 2 standby
    osd: 6 osds: 6 up (since 22h), 6 in (since 22h)
 
  data:
    volumes: 1/1 healthy
    pools:   5 pools, 113 pgs
    objects: 67 objects, 107 MiB
    usage:   20 GiB used, 160 GiB / 180 GiB avail
    pgs:     113 active+clean

Storage Usage

# ceph df

Auth

# ceph auth list

MON

# ceph mon stat

# ceph mon dump
epoch 3
fsid cf79beac-61eb-11ed-a2e0-080027d3c643
last_changed 2022-11-11T18:16:17.258788+0000
created 2022-11-11T18:08:21.534427+0000
min_mon_release 17 (quincy)
election_strategy: 1
0: [v2:192.168.200.1:3300/0,v1:192.168.200.1:6789/0] mon.ceph-node-01
1: [v2:192.168.200.2:3300/0,v1:192.168.200.2:6789/0] mon.ceph-node-02
2: [v2:192.168.200.3:3300/0,v1:192.168.200.3:6789/0] mon.ceph-node-03
dumped monmap epoch 3

// Client 将首选与 Leader Mon 建立连接,然后依照 rank 进行
# ceph quorum_status -f json-pretty

OSD

# ceph osd tree

# ceph osd stat
6 osds: 6 up (since 22h), 6 in (since 22h); epoch: e649

# ceph osd dump

# ceph osd blacklist ls
192.168.200.2:0/2497510580 2022-11-22T17:20:35.443089+0000
192.168.200.2:0/1367794813 2022-11-22T17:20:35.443089+0000
192.168.200.2:0/2868426778 2022-11-22T17:20:35.443089+0000
192.168.200.2:0/3182936832 2022-11-22T17:20:35.443089+0000
192.168.200.2:6816/2457673239 2022-11-22T17:20:35.443089+0000
192.168.200.2:6817/2457673239 2022-11-22T17:20:35.443089+0000
listed 6 entries

CRUSH map

# ceph osd crush dump

# ceph osd crush rule list

# ceph osd crush rule dump <crush_rule_name>

# ceph osd find <Numeric_OSD_ID>

MDS

# ceph mds stat

# ceph mds dump

# ceph fs ls

监控系统方案

GitHub – ceph/calamari,最后一次更新是 Jan 4, 2018(11/22/2022)
GitHub – ceph/calamari-clients,已归档;
GitHub – ceph/romana,已归档;