增加日志进程等信息采集

This commit is contained in:
Alex Yang
2025-12-04 16:29:05 +08:00
parent 1a80c5acb8
commit 057a2ea9ee
15 changed files with 2090 additions and 379 deletions

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# 测试发送单个指标对象
echo "测试发送单个指标对象:"
curl -v -X POST -H "Content-Type: application/json" -H "X-Device-ID: test-device" -H "X-Agent-Name: test-agent" -H "X-Device-Token: test-token" -d '{"cpu": 50.5, "memory": 30.2, "disk": {":/": 45.6}, "network": {"eth0": {"bytes_sent": 1000, "bytes_received": 2000}}}' http://localhost:8080/api/metrics/
echo "\n---\n"
# 测试发送指标数组
echo "测试发送指标数组:"
curl -v -X POST -H "Content-Type: application/json" -H "X-Device-ID: test-device" -H "X-Agent-Name: test-agent" -H "X-Device-Token: test-token" -d '[{"cpu": 50.5, "memory": 30.2, "disk": {":/": 45.6}, "network": {"eth0": {"bytes_sent": 1000, "bytes_received": 2000}}}, {"cpu": 60.5, "memory": 40.2, "disk": {":/": 55.6}, "network": {"eth0": {"bytes_sent": 2000, "bytes_received": 3000}}}]' http://localhost:8080/api/metrics/