Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Count Ceph monitors from monitor arrays
rcourtman3146d83701d7
diff --git a/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-ceph-monitors-2026-05-01.md b/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-ceph-monitors-2026-05-01.mdnew file mode 100644index 0000000000..7c06b46576--- /dev/null+++ b/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-ceph-monitors-2026-05-01.md@@ -0,0 +1,50 @@+# Known RC Issue Closure For GA Ceph Monitors Record++- Date: `2026-05-01`+- Gate: `known-rc-issue-closure-for-ga`+- Result: `passed`++## Context++Recent discussion triage found discussion `#1290` as a remaining technical+candidate. The reporter's `v5.1.28` screenshot was inspected and showed the+Ceph page reporting:++- Managers: `3`+- Monitors: `0`+- OSDs: `9 / 9`+- PGs: `129`++That shape points to a partial Ceph status decode rather than a missing Ceph+cluster: the same status payload was rich enough to count managers and OSDs,+but the monitor count fell through to zero.++## Disposition++The current v6 Proxmox Ceph decoder had the same compatibility risk because+`pkg/proxmox/ceph.go` only accepted monitor totals through+`monmap.num_mons`. Some Ceph/Proxmox status payloads expose the concrete+monitor list under `monmap.mons` or `monmap.monitors` instead.++The fix is in the shared Proxmox Ceph compatibility layer:++- `pkg/proxmox/ceph.go` now normalizes monitor totals from+ `monmap.num_mons`, legacy `monmap.numMons`, `monmap.mons`, or+ `monmap.monitors`.+- The Ceph page and unified resource projection continue to consume the+ canonical `numMons` model field; no frontend or page-local workaround is+ needed.+- `docs/release-control/v6/internal/subsystems/monitoring.md` now records this+ monitor-count compatibility contract beside the existing Ceph manager standby+ payload rule.++## Proof++- `go test ./pkg/proxmox -run 'TestGetCephStatus|TestGetCephDF' -count=1`+- `go test ./internal/monitoring -run 'TestBuildCephClusterModel|TestCountCephMonitorDaemons|TestCountCephManagerDaemons|TestPollCephCluster' -count=1`++## Outcome++The v6 candidate no longer depends on one narrow Proxmox Ceph monitor-count+field and should not regress the reported Ceph monitor count symptom when users+move from v5 to v6.diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.jsonindex dd219cd4bc..a6ce39703c 100644--- a/docs/release-control/v6/internal/status.json+++ b/docs/release-control/v6/internal/status.json@@ -4365,6 +4365,12 @@"kind": "file","evidence_tier": "managed-runtime-exercise"},+ {+ "repo": "pulse",+ "path": "docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-ceph-monitors-2026-05-01.md",+ "kind": "file",+ "evidence_tier": "managed-runtime-exercise"+ },{"repo": "pulse","path": "docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-duplicate-metrics-2026-05-01.md",diff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.mdindex dc8b698d5f..de7631f808 100644--- a/docs/release-control/v6/internal/subsystems/monitoring.md+++ b/docs/release-control/v6/internal/subsystems/monitoring.md@@ -137,10 +137,11 @@ That same monitoring owner also governs collector payload compatibility at theshared boundary. Podman container stats must honor Podman's compat payload whenit exposes a direct CPU percentage and otherwise fall back to Podman'swall-clock delta semantics rather than Docker's multi-core normalization, and-Proxmox Ceph status decoding must accept manager standby entries as either bare-names or structured objects so collector payload variations do not break the-canonical monitoring path. That same compatibility boundary also owns legacy-Unraid raw-status normalization at host-agent ingest: when older agents send+Proxmox Ceph status decoding must accept monitor totals from either+`monmap.num_mons` or the concrete monitor arrays and manager standby entries as+either bare names or structured objects so collector payload variations do not+break the canonical monitoring path. That same compatibility boundary also owns+legacy Unraid raw-status normalization at host-agent ingest: when older agents send`rawStatus` without the newer normalized `status`, `internal/monitoring/monitor_agents.go`must derive the canonical disk status before storage-risk assessment runs sov5 aggregate counters do not override clearly healthy per-disk state during v6diff --git a/pkg/proxmox/ceph.go b/pkg/proxmox/ceph.goindex 6b06cdf35d..0e024fdcd8 100644--- a/pkg/proxmox/ceph.go+++ b/pkg/proxmox/ceph.go@@ -65,6 +65,35 @@ type CephMonMap struct {NumMons int `json:"num_mons"`}+func (m *CephMonMap) UnmarshalJSON(data []byte) error {+ type rawCephMonMap struct {+ NumMons int `json:"num_mons"`+ NumMonsLegacy int `json:"numMons"`+ Mons []json.RawMessage `json:"mons"`+ Monitors []json.RawMessage `json:"monitors"`+ }++ var raw rawCephMonMap+ if err := json.Unmarshal(data, &raw); err != nil {+ return err+ }++ switch {+ case raw.NumMons > 0:+ m.NumMons = raw.NumMons+ case raw.NumMonsLegacy > 0:+ m.NumMons = raw.NumMonsLegacy+ case len(raw.Mons) > 0:+ m.NumMons = len(raw.Mons)+ case len(raw.Monitors) > 0:+ m.NumMons = len(raw.Monitors)+ default:+ m.NumMons = 0+ }++ return nil+}+// CephMgrMap captures manager summary information.type CephMgrMap struct {Available bool `json:"available"`diff --git a/pkg/proxmox/ceph_test.go b/pkg/proxmox/ceph_test.goindex b630df9179..4b26eee70e 100644--- a/pkg/proxmox/ceph_test.go+++ b/pkg/proxmox/ceph_test.go@@ -63,6 +63,61 @@ func TestGetCephStatus(t *testing.T) {}}+func TestGetCephStatusCountsMonitorArrayFallback(t *testing.T) {+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ if r.URL.Path != "/cluster/ceph/status" {+ http.NotFound(w, r)+ return+ }+ resp := map[string]interface{}{+ "data": map[string]interface{}{+ "fsid": "fsid-1",+ "health": map[string]interface{}{+ "status": "HEALTH_OK",+ "summary": []map[string]interface{}{},+ "checks": map[string]interface{}{},+ },+ "servicemap": map[string]interface{}{+ "services": map[string]interface{}{},+ },+ "monmap": map[string]interface{}{+ "mons": []map[string]interface{}{+ {"name": "mon-a", "rank": 0},+ {"name": "mon-b", "rank": 1},+ {"name": "mon-c", "rank": 2},+ },+ },+ "mgrmap": map[string]interface{}{+ "available": true,+ "num_mgrs": 3,+ "active_name": "mgr-a",+ "standbys": []string{"mgr-b", "mgr-c"},+ },+ "osdmap": map[string]interface{}{+ "num_osds": 9,+ "num_up_osds": 9,+ "num_in_osds": 9,+ },+ "pgmap": map[string]interface{}{+ "num_pgs": 129,+ },+ },+ }+ _ = json.NewEncoder(w).Encode(resp)+ }))+ defer server.Close()++ client := &Client{baseURL: server.URL, httpClient: server.Client()}+ status, err := client.GetCephStatus(context.Background())+ if err != nil {+ t.Fatalf("unexpected error: %v", err)+ }++ if status.MonMap.NumMons != 3 {+ t.Fatalf("expected monmap.mons fallback to count 3 monitors, got %+v", status.MonMap)+ }+}+func TestGetCephStatusAcceptsStructuredManagerStandbys(t *testing.T) {server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {if r.URL.Path != "/cluster/ceph/status" {