Better Dry Run Summary
This commit is contained in:
@ -114,25 +114,38 @@ class SystemHealthMonitor:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if self.dry_run:
|
if self.dry_run:
|
||||||
logger.info("=== Detailed Health Check Results ===")
|
logger.info("\n=== System Health Summary ===")
|
||||||
logger.info(f"Drive Health Status: {health_report['drives_health']['overall_status']}")
|
logger.info(f"Overall Drive Health: {health_report['drives_health']['overall_status']}")
|
||||||
for drive in health_report['drives_health']['drives']:
|
|
||||||
temp_str = f", Temp: {drive.get('temperature')}°C" if drive.get('temperature') else ""
|
|
||||||
logger.info(f"Drive {drive['device']}{temp_str}: {drive.get('usage_percent', 0)}% used, SMART: {drive['smart_status']}")
|
|
||||||
for partition in drive.get('partitions', []):
|
|
||||||
logger.info(f" └─ {partition['device']} mounted on {partition['mountpoint']}")
|
|
||||||
logger.info(f" {partition['used_space']}/{partition['total_space']} ({partition['usage_percent']}% used)")
|
|
||||||
|
|
||||||
logger.info(f"Memory Status: {health_report['memory_health']['status']}")
|
|
||||||
logger.info(f"Memory Usage: {health_report['memory_health']['memory_percent']}%")
|
|
||||||
logger.info(f"ECC Memory: {'Present' if health_report['memory_health']['has_ecc'] else 'Not Present'}")
|
|
||||||
if health_report['memory_health']['has_ecc'] and 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']})")
|
# Summarized drive information with usage
|
||||||
logger.info(f"Network Management Status: {health_report['network_health']['management_network']['status']}")
|
logger.info("\nDrive Status:")
|
||||||
logger.info(f"Network Ceph Status: {health_report['network_health']['ceph_network']['status']}")
|
for drive in health_report['drives_health']['drives']:
|
||||||
logger.info("================================")
|
issues = drive.get('smart_issues', [])
|
||||||
|
temp = f", {drive.get('temperature')}°C" if drive.get('temperature') else ""
|
||||||
|
status = "⚠️ " if issues else "✓ "
|
||||||
|
|
||||||
|
# Disk usage information
|
||||||
|
usage_info = ""
|
||||||
|
if drive.get('partitions'):
|
||||||
|
for partition in drive['partitions']:
|
||||||
|
usage_info += f"\n └─ {partition['mountpoint']}: {partition['used_space']}/{partition['total_space']} ({partition['usage_percent']}% used)"
|
||||||
|
|
||||||
|
logger.info(f"{status}{drive['device']}{temp} - SMART: {drive['smart_status']}{usage_info}")
|
||||||
|
if issues:
|
||||||
|
logger.info(f" Issues: {', '.join(issues)}")
|
||||||
|
|
||||||
|
logger.info(f"\nMemory: {health_report['memory_health']['memory_percent']}% used")
|
||||||
|
if health_report['memory_health'].get('has_ecc'):
|
||||||
|
logger.info("ECC Memory: Present")
|
||||||
|
if health_report['memory_health'].get('ecc_errors'):
|
||||||
|
logger.info(f"ECC Errors: {len(health_report['memory_health']['ecc_errors'])} found")
|
||||||
|
|
||||||
|
logger.info(f"\nCPU Usage: {health_report['cpu_health']['cpu_usage_percent']}%")
|
||||||
|
|
||||||
|
logger.info("\nNetwork Status:")
|
||||||
|
logger.info(f"Management: {health_report['network_health']['management_network']['status']}")
|
||||||
|
logger.info(f"Ceph: {health_report['network_health']['ceph_network']['status']}")
|
||||||
|
logger.info("\n=== End Summary ===")
|
||||||
|
|
||||||
return health_report
|
return health_report
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user