feat(nodes): add fleet monitoring and implement the Penpot layout (#7342)

Expose sampled CPU topology, absolute RAM, TCP/UDP counts, load averages and network throughput through the existing heartbeat and descendant contracts, preserving measured zero versus unavailable values. Add an explicit nullable telemetry migration and freshness/availability checks.

Provide read-only All nodes and Master rows with deduplicated host/client totals, grouped SQL aggregation and reporting coverage. Preserve known descendants during parent outages and prefer the freshest valid observation of shared GUIDs. Keep the ordinary heartbeat broadcast free of fleet-wide totals.

Implement the approved compact Penpot-inspired Nodes layout, responsive stacked details, status diagnostics and existing remote actions. Preserve cached rows, search and controls on overview refresh failures. By maintainer decision, hide both system rows when no remote nodes are registered.

Final review of 44ed457985: no outstanding HIGH or MEDIUM findings. CI and Docs CI passed (13 jobs; 2342 frontend tests in 269 files), including Go/race and mixed-version node E2E. Feature-specific PostgreSQL regression execution was not independently verified in the selected CI logs. See https://github.com/MHSanaei/3x-ui/pull/7342#issuecomment-7363599190.

Closes #7335
Closes #7336
Closes #7337
This commit is contained in:
Hamed
2026-12-03 04:19:48 +03:30
committed by GitHub
parent 0afa11ddff
commit ef99e67507
64 changed files with 4710 additions and 1608 deletions
+22
View File
@@ -0,0 +1,22 @@
package model
// NodeTelemetry describes one host sample. Nil metrics were not measured.
type NodeTelemetry struct {
SampledAt int64 `json:"sampledAt" example:"1700000000000"`
SampleAgeMillis *int64 `json:"sampleAgeMillis,omitempty" example:"125"`
ResourceScope string `json:"resourceScope,omitempty" example:"container"`
CpuPct *float64 `json:"cpuPct,omitempty" example:"12.5"`
PhysicalCores *int `json:"physicalCores,omitempty" example:"4"`
LogicalCores *int `json:"logicalCores,omitempty" example:"8"`
MemUsedBytes *uint64 `json:"memUsedBytes,omitempty" example:"2147483648"`
MemTotalBytes *uint64 `json:"memTotalBytes,omitempty" example:"4294967296"`
MemAvailableBytes *uint64 `json:"memAvailableBytes,omitempty" example:"1073741824"`
TCPCount *int `json:"tcpCount,omitempty" example:"75"`
UDPCount *int `json:"udpCount,omitempty" example:"12"`
Load1 *float64 `json:"load1,omitempty" example:"0.25"`
Load5 *float64 `json:"load5,omitempty" example:"0.18"`
Load15 *float64 `json:"load15,omitempty" example:"0.12"`
UptimeSecs *uint64 `json:"uptimeSecs,omitempty" example:"3600"`
NetUp *uint64 `json:"netUp,omitempty" example:"1024"`
NetDown *uint64 `json:"netDown,omitempty" example:"2048"`
}