ceph health detail: read the output and HEALTH_WARN codes
Read the code, severity and target lines in ceph health detail output, use json-pretty in scripts, and look up common warning codes with what to check first.
Ceph reports problems as upper-case codes such as OSD_DOWN. Read the code first and you know where to look. The query commands are read-only. Changing a quota, archiving crashes, clearing flags, deep scrubbing and muting change cluster state and are marked as such. Run everything on a node that has an admin keyring.
[1] Check the overall cluster status. If the health: line is not HEALTH_OK, continue.
# ceph -s[2] List the warning codes and what they refer to. Each code gets one entry, followed by the OSDs, PGs or daemons involved.
# ceph health detailHere is how to read it. This is the example from the official documentation.
[WRN] OSD_SLOW_PING_TIME_BACK: Slow OSD heartbeats on back (longest 1118.001ms) Slow OSD heartbeats on back from osd.0 [dc1,rack1] to osd.1 [dc1,rack1] 1118.001 msec possibly improving Slow OSD heartbeats on back from osd.0 [dc1,rack1] to osd.2 [dc1,rack2] 1030.123 msec Slow OSD heartbeats on back from osd.2 [dc1,rack2] to osd.1 [dc1,rack1] 1015.321 msec Slow OSD heartbeats on back from osd.1 [dc1,rack1] to osd.0 [dc1,rack1] 1010.456 msec[WRN]: the severity marker. The documentation's examples use[WRN]and[ERR]. The overall cluster status (HEALTH_WARN,HEALTH_ERR) is shown separately at the top.OSD_SLOW_PING_TIME_BACK: the health check code. Look it up by this name in the official health checks page.- Text after the colon: the summary sentence.
- Indented lines: the targets. Here, which pair of OSDs and how long the delay was.
For this slow-ping check the monitoring page says the ceph health detail output is limited to ten lines. It does not say whether other codes behave the same, so do not assume the visible lines are the full list when many targets are involved.
A muted entry is prefixed with (MUTED); muting is covered in step 8.
For scripts, ask for JSON. The man page lists -f / --format as a common ceph option accepting json, json-pretty, xml, xml-pretty and plain.
# ceph health detail --format json-pretty > health.json[3] OSD_DOWN and PG_DEGRADED usually appear together. OSD_DOWN means one or more OSDs are marked down: the ceph-osd daemon or its host stopped, or peers cannot reach it over the network. Find the OSD (rows whose STATUS is down), then check the host, the daemon and the network in that order.
# ceph osd treePG_DEGRADED means some data has fewer replicas (or erasure-code fragments) than desired, most often because of a down OSD. Inspect one PG with:
# ceph tell <pgid> query[4] OSD_NEARFULL is an early warning: one or more OSDs passed the nearfull threshold. Check usage before the cluster fills up.
# ceph dfPOOL_NEAR_FULL means a pool is approaching a configured limit; pool quotas, mon_osd_nearfull_ratio and mon_osd_full_ratio all play a part. View and change a pool quota as below. A value of 0 disables the quota.
# ceph osd pool get-quota <pool># ceph osd pool set-quota <pool> max_bytes <bytes>[5] MON_CLOCK_SKEW means the clocks on hosts running Monitors differ by more than mon_clock_drift_allowed. The documented fix is to synchronize the clocks with ntpd or chrony. Check the sync state on each monitor host.
# chronyc tracking[6] RECENT_CRASH means a daemon crashed recently and the crash has not been acknowledged (archived). List new crashes and read one in full.
# ceph crash ls-new# ceph crash info <crash-id>Once you know the cause, archive the report to clear the warning (a state change; the report itself is kept), one at a time or all at once.
# ceph crash archive <crash-id># ceph crash archive-all[7] Codes beyond the ones above that you meet often in operation. Meanings come from the official health checks page and the CephFS health messages page (codes starting with MDS_).
| Code | Meaning | First check |
|---|---|---|
SLOW_OPS | OSD or monitor requests are taking long: extreme load, a slow storage device, or a software bug | On the OSD host, ceph daemon osd.<id> ops (inside cephadm shell --name osd.<id> on cephadm deployments); summary of the slowest recent requests with ceph daemon osd.<id> dump_historic_ops; location with ceph osd find osd.<id> |
PG_AVAILABILITY | Some data cannot be read or written: PGs are peering, stale, incomplete or not active. Usually caused by down OSDs | ceph health detail to see the PGs, then ceph tell <pgid> query |
OSDMAP_FLAGS | Cluster flags such as noout, norecover or noscrub are set | Make sure maintenance is finished and no OSD is down, then ceph osd unset <flag>. Clearing noout early lets down OSDs be marked out and starts rebalancing (full cannot be cleared this way) |
POOL_NEAR_FULL | A pool is approaching a configured limit; pool quota thresholds, mon_osd_nearfull_ratio and mon_osd_full_ratio all play a part | ceph df, ceph osd pool get-quota <pool> |
POOL_FULL | A pool reached its quota and no longer accepts writes | ceph df detail; raise the quota or delete data |
MON_DISK_LOW | Free space on the monitor database file system dropped below mon_data_avail_warn (default 30%) | On the monitor host, df -h for the file system holding /var/lib/ceph/<fsid>/mon.<monid> |
PG_NOT_DEEP_SCRUBBED | PGs were not deep-scrubbed in time | ceph health detail for the PGs; start one manually with ceph pg deep-scrub <pgid>; it reads every object in the PG, so run a few at a time in a quiet period |
MDS_SLOW_REQUEST | Client requests are taking longer than mds_op_complaint_time (default 30 s) | List outstanding operations with the MDS ops admin socket command (ceph daemon mds.<name> ops) |
MDS_TRIM | The metadata journal is behind on trimming: slow writeback or a bug | Find the MDS in ceph health detail, then ceph fs status |
MDS_CACHE_OVERSIZED | The MDS cannot trim its cache to mds_cache_memory_limit; by default raised at 150% of the limit or more | Find the MDS in ceph health detail, then ceph fs status |
FS_DEGRADED | One or more MDS ranks are failed or damaged; the file system may be partly or fully unavailable | ceph fs status, ceph health detail |
[8] Mute a warning you understand and can leave for now. With a duration, the mute expires on its own.
# ceph health mute OSD_DOWN 4h# ceph health mute MON_DOWN 15mIf nothing else is wrong, the status becomes HEALTH_OK, and ceph health lists the mute.
HEALTH_OK (muted: OSD_DOWN)Remove a mute with:
# ceph health unmute OSD_DOWN