Enhancement #76589
closedSurface Prometheus metrics for the size of each mon's db and the amount of free space on the db's filesystem
0%
AD Updated by Anthony D'Atri 7 months ago
- Tags set to low-hanging-fruit
- Subject changed from Surface Prometheus metrics for the size of each mon to Surface Prometheus metrics for the size of each mon's db and the amount of free space on the db's filesystem
- Category set to Monitor
It would be useful for trending to surface the size of each mon's DB as a Prometheus metric,.
In HealthMonitor.cc around line 604 we see `stats.store_stats.bytes_total` and `stats.fs_stats.avail_percent`, so this should simply be a matter of surfacing.
`src/pybind/mgr/prometheus/module.py` and `src/exporter/DaemonMetricCollector.cc` may be of interest.
LS Updated by Lumir Sliva 7 months ago
- Status changed from New to In Progress
- Assignee set to Lumir Sliva
Taking this. Branch mon-data-perf-counters adds four per-mon perf counters in the existing mon group:
data_disk_total_bytes- filesystem totaldata_disk_avail_bytes- filesystem availabledata_disk_avail_percent- filesystem available, as a percentagedb_total_bytes- estimated on-disk size of the mon key/value store
Values come from stats.fs_stats.* and stats.store_stats.bytes_total that HealthMonitor::check_member_health() already collects on every tick. They surface automatically as ceph_mon_* Prometheus metrics via the prometheus mgr module and ceph-exporter (both consume daemon perf counters at PRIO_USEFUL). No new config option; no admin-socket additions.
Build and verify on a vstart cluster next, PR to follow.
LS Updated by Lumir Sliva 7 months ago
- Pull request ID set to 68916
PR submitted: https://github.com/ceph/ceph/pull/68916
Verified on vstart (1 mon + 1 mgr + 1 osd):
perf dump monandcounter dumpboth show the four new countersperf schemareports them aspriority: 5(PRIO_USEFUL),units: byteswhere applicable, gaugeprometheusmgr module exposes them at/metricsasceph_mon_{data_disk_total_bytes,data_disk_avail_bytes,data_disk_avail_percent,db_total_bytes}withceph_daemon="mon.a"label (setmgr/prometheus/exclude_perf_counterstofalseto see them)ceph-exporterexposes the same names/descriptions on its endpoint (default scrape path)db_total_bytesvisibly grows across scrapes as the mon writes maps/keys, which is what trending is meant to expose
UB Updated by Upkeep Bot 4 months ago
- Status changed from In Progress to Resolved
- Merge Commit set to d811619430dcc47dd3c7ecc279c58cb11181f0fb
- Fixed In set to v21.3.0-2145-gd811619430
- Upkeep Timestamp set to 2026-08-19T07:55:59+00:00
LS Updated by Lumir Sliva 4 months ago
- Status changed from Resolved to Pending Backport
- Backport set to squid tentacle
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #79613: squid: Surface Prometheus metrics for the size of each mon's db and the amount of free space on the db's filesystem added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #79614: tentacle: Surface Prometheus metrics for the size of each mon's db and the amount of free space on the db's filesystem added
UB Updated by Upkeep Bot 4 months ago
- Tags (freeform) set to backport_processed
LS Updated by Lumir Sliva 4 months ago
- Backport changed from squid tentacle to squid tentacle umbrella
LS Updated by Lumir Sliva 4 months ago
- Copied to Backport #79618: umbrella: Surface Prometheus metrics for the size of each mon's db and the amount of free space on the db's filesystem added
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-08-19T07:55:59+00:00 to 2026-08-27T18:46:08+00:00