46 lines
812 B
Python
46 lines
812 B
Python
from __future__ import annotations
|
|
|
|
from app.models.common import APIModel, SourceStatus, TimestampedResponse
|
|
|
|
|
|
class SystemSource(APIModel):
|
|
name: str
|
|
status: SourceStatus
|
|
host_name: str
|
|
agent_name: str
|
|
|
|
|
|
class SystemCPU(APIModel):
|
|
usage_percent: float
|
|
cores: int
|
|
load_1: float
|
|
load_5: float
|
|
load_15: float
|
|
|
|
|
|
class SystemMemory(APIModel):
|
|
used_gb: float
|
|
total_gb: float
|
|
available_gb: float
|
|
usage_percent: float
|
|
|
|
|
|
class SystemNetwork(APIModel):
|
|
primary_interface: str
|
|
rx_mbps: float
|
|
tx_mbps: float
|
|
|
|
|
|
class SystemHost(APIModel):
|
|
uptime_seconds: int
|
|
platform: str
|
|
kernel: str
|
|
|
|
|
|
class SystemResponse(TimestampedResponse):
|
|
source: SystemSource
|
|
cpu: SystemCPU
|
|
memory: SystemMemory
|
|
network: SystemNetwork
|
|
host: SystemHost
|