feat: add dynamic config reload, unique device identity (UUID), and MQTT support

- New StreamManager for dynamic RTSP/FLV stream lifecycle
- Dynamic worker scaling for inference
- Device UUID generation and persistence
- Telegraf config and NPU monitoring scripts
- .gitignore for build artifacts
This commit is contained in:
2026-05-08 16:26:10 +08:00
parent 2e7245d62e
commit 6e88d2392f
12 changed files with 433 additions and 70 deletions

32
config/telegraf.conf Normal file
View File

@@ -0,0 +1,32 @@
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
flush_interval = "10s"
hostname = "edge-001" # 启动时替换为实际 edge_id
# 输出到云端 InfluxDB
[[outputs.influxdb_v2]]
urls = ["http://101.36.73.102:18086"]
token = "my-super-secret-token" # 替换为实际 token
organization = "tianyan"
bucket = "edge_metrics"
# 基础硬件监控
[[inputs.cpu]]
percpu = false
totalcpu = true
[[inputs.mem]]
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
[[inputs.net]]
# NPU 自定义监控
[[inputs.exec]]
commands = ["/opt/tianyan-edge/scripts/npu_info.sh"]
timeout = "5s"
data_format = "influx"