dushixiang
14a48f81a4
feat: support disabling agents
2026-08-26 20:24:17 +08:00
dushixiang
a4f7c82de6
更新包路径
2026-08-12 18:59:29 +08:00
dushixiang
60678ea1bc
chore: upgrade dependencies
2026-07-08 21:56:14 +08:00
dushixiang and Claude Opus 4.7
c431f300bc
新增实时监控模式,agent 1s 并行采集 + 前端滑动窗口
...
agent
- 移除 collector.interval 配置项;按指标类型内置节奏:cpu/memory/network/
disk_io/gpu/network_connection 1s,temperature 5s,disk 30s,host 60s
- doCollectAndSend 改为并行执行本 tick 到期的采集器,避免串行累计耗时
超过 1s 节奏;每个 goroutine 加 recover 兜底,单点 panic 不拖垮整 tick
server
- LatestMetrics 加 sync.RWMutex + Update/Snapshot 方法,HandleMetricData
所有写入走 Update;GetLatestMetrics 返回 Snapshot,handler 在副本上
sanitize,修复 marshal 时与 ws 写入的 data race(go test -race 验证)
- HandleMetricData defer Set 缓存项,每次上报刷新 TTL;host case 也走
Update,不再 1 小时后失效
- LatestMetrics.Timestamp 用服务端 time.Now(),agent 时钟倒拨不会冻结
前端实时图;Timestamp/DiskIOSummary 字段补到 LatestMetrics
- AutoStep 新增 r ≤ 5m → 1s 档;timeRangeMilliseconds 加 2m
frontend
- 详情页加"实时"档位(默认),1s 拉 latestMetrics + 1m 历史播种 + 滑动
2 分钟窗口;快图表(CPU/Memory/Network/DiskIO/NetworkConnection)走
useLiveBuffer 追加,慢图表(GPU/Temperature/Monitor)保留 refetch
- useLiveBuffer:seed 不再覆盖已追加的 livePoint;resetKey 处理切网卡 /
切 agent 时的语义复位
- formatChartTime live 档位精确到秒;修复 1d/24h 仅显示 HH:mm 跨夜歧义
- 慢图表用 React.memo,阻断 1Hz 节奏的级联重渲染
- GpuChart 修复 utilization/temperature 时间戳错位时温度点丢失
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-06 23:18:50 +08:00
yumusb
63cdd37b12
Hide agent IP when unauthenticated
...
Ensure agent.IP is cleared for unauthenticated requests. Previously IPv4, IPv6 and Hostname were redacted, but agent.IP was left intact and could leak sensitive information. This change sets agent.IP to an empty string in Get() when the user is not authenticated.
2026-02-24 09:44:27 +08:00
dushixiang
c9b6d6ff5a
优化流量统计
2026-01-25 22:01:56 +08:00
dushixiang
ff2afc82a5
移除管理员探针管理的分页功能,增加标签过滤,与公共页面保持一致的排序逻辑 fix #47
2026-01-24 21:51:23 +08:00
dushixiang
be54ef2d31
增加公网 IP 采集和网卡 IP 展示
2026-01-17 16:24:59 +08:00
dushixiang
3cf4d7e5a9
优化目录保护
2026-01-09 21:53:44 +08:00
dushixiang
1f22880440
优化探针流量统计
2026-01-08 23:27:03 +08:00
dushixiang
3016121cc4
继续优化调整代码
2026-01-08 22:22:34 +08:00
dushixiang
0aab4dc25a
拆分文件,降低 agent_handler.go 复杂度
2026-01-08 18:58:24 +08:00