B35iaddZddlmZddlmZddlmZddlmZddlm Z ddl m Z Gd d Z y ) z Fleet Status Orchestrator Collects monitoring data from all sources: - Docker containers (14 total) - WireGuard tunnel - Restic backups - Disk space - Services health Returns unified status dict for GUI/alerts. )Dict)datetime) DockerMonitor) TunnelMonitor) BackupMonitor) DiskMonitorc2eZdZdZdZdefdZdedefdZy) FleetStatuszUnified fleet monitoringc|t|_t|_t |_t |_y)N)rdockerrtunnelrbackupr disk)selfs D/mnt/ssd/data/python-lab/DaemonControl/modules/fleet/fleet_status.py__init__zFleetStatus.__init__s&#o #o #o M returnc>|jj|jj|jj|jjt j jd}|j||d<|S)a> Get complete fleet status. Returns: { 'overall': 'healthy' | 'warning' | 'critical', 'docker': {...}, 'tunnel': {...}, 'backup': {...}, 'disk': {...}, 'timestamp': '...' } )r rrr timestampoverall) r checkrrrrnow isoformat_determine_overall_health)rstatuss r get_statuszFleetStatus.get_statusswkk'')kk'')kk'')IIOO%!113  !::6By rrc|djdd|djdd|djdd|djddg}d|vryd|vryy) z Determine overall fleet health from individual checks. Rules: - critical: if any monitor is 'critical' - warning: if any monitor is 'warning' - healthy: if all monitors are 'healthy' r rwarningrrrcriticalhealthy)get)rrstatusess rrz%FleetStatus._determine_overall_health:sy 8  9 5 8  9 5 8  9 5 6N  x 3    ! ( "rN) __name__ __module__ __qualname____doc__rrrstrrrrr r s)"" D6rr N) r(typingrrdocker_monitorrtunnel_monitorrbackup_monitorr disk_monitorr r r*rrr0s( )))%99r