Added more logging for debugging
This commit is contained in:
@ -94,8 +94,6 @@ class SystemHealthMonitor:
|
||||
def perform_health_checks(self) -> Dict[str, Any]:
|
||||
"""
|
||||
Perform comprehensive system health checks and return a report.
|
||||
|
||||
:return: Dictionary containing results of various health checks.
|
||||
"""
|
||||
health_report = {
|
||||
'drives_health': self._check_drives_health(),
|
||||
@ -103,6 +101,24 @@ class SystemHealthMonitor:
|
||||
'cpu_health': self._check_cpu_usage(),
|
||||
'network_health': self._check_network_status()
|
||||
}
|
||||
|
||||
if self.dry_run:
|
||||
logger.info("=== Detailed Health Check Results ===")
|
||||
logger.info(f"Drive Health Status: {health_report['drives_health']['overall_status']}")
|
||||
for drive in health_report['drives_health']['drives']:
|
||||
logger.info(f"Drive {drive['mountpoint']}: {drive['usage_percent']}% used, SMART: {drive['smart_status']}")
|
||||
|
||||
logger.info(f"Memory Status: {health_report['memory_health']['status']}")
|
||||
if health_report['memory_health']['has_ecc']:
|
||||
logger.info("ECC Memory: Present")
|
||||
if health_report['memory_health']['ecc_errors']:
|
||||
logger.info(f"ECC Errors: {health_report['memory_health']['ecc_errors']}")
|
||||
|
||||
logger.info(f"CPU Usage: {health_report['cpu_health']['cpu_usage_percent']}% ({health_report['cpu_health']['status']})")
|
||||
logger.info(f"Network Management Status: {health_report['network_health']['management_network']['status']}")
|
||||
logger.info(f"Network Ceph Status: {health_report['network_health']['ceph_network']['status']}")
|
||||
logger.info("================================")
|
||||
|
||||
return health_report
|
||||
|
||||
def _generate_detailed_description(self, issue: str, health_report: Dict[str, Any]) -> str:
|
||||
|
||||
Reference in New Issue
Block a user