mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-04 00:15:09 +03:00
feat(nodes): add fleet monitoring and host telemetry
Carry sampled host metrics through existing heartbeats and count client identities in SQL. Show the current panel and fleet in a responsive monitoring table based on the approved design.
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
Reference in New Issue
Block a user