feat: add node agent system with heartbeat collection, installer generation, and traffic flow telemetry
CI / backend (push) Failing after 3s
CI / frontend (push) Failing after 28s

Add NodeAgent and TrafficFlow models to track agent status and network flows, implement /agents/heartbeat endpoint to receive interface counters, conntrack flows, firewall status, and nftables ruleset hash from agents, add nexafabric-agent.py Python script to collect host telemetry including VM/LXC interface hints via tap/fwbr regex matching, conntrack flow parsing with protocol/state/byte counters, and pve-firewall status checks,
This commit is contained in:
2026-07-09 14:13:47 +02:00
parent 88badf1f22
commit e67174a4ae
8 changed files with 677 additions and 7 deletions
+28
View File
@@ -181,6 +181,34 @@ class NodeRead(OrmModel):
memory_mb: int
class NodeAgentRead(BaseModel):
node_id: str
status: str
version: str | None = None
last_seen_at: datetime | None = None
install_count: int = 0
last_payload: dict[str, Any] | None = None
class NodeWithAgentRead(NodeRead):
agent: NodeAgentRead | None = None
class AgentHeartbeat(BaseModel):
version: str
node_name: str | None = None
collected_at: datetime | None = None
hostname: str | None = None
kernel: str | None = None
uptime_seconds: float | None = None
loadavg: list[float] = []
interfaces: list[dict[str, Any]] = []
flows: list[dict[str, Any]] = []
conntrack: dict[str, Any] = {}
firewall: dict[str, Any] = {}
extra: dict[str, Any] = {}
class WorkloadRead(OrmModel):
id: str
cluster_id: str