Skip to main content

运行时指标结构

JSON 使用 UTF-8。时间戳是 UTC RFC3339。所有 *Ratio 字段都是 0..1,不是百分比。数组返回 [],不是 null

NodeReport

{
"version": "1.2.3",
"hostname": "node-a",
"timestamp": "2026-05-04T00:00:00Z",
"metrics": {}
}
字段说明
version节点版本
hostname主机名
timestamp节点采样时间
metricsSnapshot

Snapshot

字段说明
cpuCPU 运行时
memory内存运行时
disk磁盘运行时,见 磁盘结构
network[]网卡运行时
system系统运行时
processes进程数
connectionsTCP/UDP 连接数
raidRAID 运行时

CPU

{
"usage_ratio": 0.34,
"load1": 0.42,
"load5": 0.39,
"load15": 0.37,
"times": {
"user": 1,
"system": 1,
"idle": 1,
"iowait": 0,
"steal": 0
}
}

Memory

{
"used": 123,
"available": 123,
"buffers": 123,
"cached": 123,
"used_ratio": 0.58,
"swap_used": 0,
"swap_free": 0,
"swap_used_ratio": 0
}

字节字段都是原始字节数。

Network

{
"name": "eth0",
"bytes_recv": 123,
"bytes_sent": 456,
"recv_rate_bytes_per_sec": 1024,
"sent_rate_bytes_per_sec": 2048,
"packets_recv": 1,
"packets_sent": 2,
"recv_rate_packets_per_sec": 1.2,
"sent_rate_packets_per_sec": 1.3,
"err_in": 0,
"err_out": 0,
"drop_in": 0,
"drop_out": 0
}

System

{
"alive": true,
"uptime_seconds": 123456,
"uptime": "01d 10h 17m 36s"
}

Processes

{ "process_count": 182 }

Connections

{ "tcp_count": 86, "udp_count": 37 }

RAID

{
"supported": true,
"available": true,
"arrays": [
{
"name": "md0",
"status": "clean",
"active": 2,
"working": 2,
"failed": 0,
"health": "healthy",
"members": [
{ "name": "sda1", "state": "up" }
],
"sync_status": "resync",
"sync_progress": "50%"
}
]
}

Static

{
"version": "1.2.3",
"timestamp": "2026-05-04T00:00:00Z",
"report_interval_seconds": 3,
"cpu": {},
"memory": {},
"disk": {},
"system": {},
"raid": {}
}

字段:

  • cpu.info.model_name
  • cpu.info.vendor_id
  • cpu.info.sockets
  • cpu.info.cores_physical
  • cpu.info.cores_logical
  • cpu.info.frequency_mhz
  • memory.total
  • memory.swap_total
  • disk
  • system.hostname
  • system.os
  • system.platform
  • system.platform_version
  • system.kernel_version
  • system.arch
  • raid.supported
  • raid.available
  • raid.arrays[]