This feature branch (feature/enhanced-metrics-collection) enhances the OpenShift ROSA Sizing Tool by adding cluster node sizing information collection to the metrics gathering process.
- Add functionality to collect actual cluster node sizing information (CPU, memory, instance types)
- Improve the output format to include both usage metrics and cluster sizing
- Maintain backward compatibility with
calculate_sizing.py - Improve error handling and user feedback
- Modify
collect_metrics.pyto add node sizing collection - Ensure backward compatibility with existing
calculate_sizing.py - Test with various scenarios
- Document changes and usage
- Created feature branch
- Added
collect_cluster_sizing()function to gather node information - Added helper functions for parsing resource strings
- Modified output structure to include both metrics and sizing information
- Maintained backward compatibility with
calculate_sizing.py - Improved error handling for partial data collection
- Fixed issue with sizing baseline display in the report
- Modified
load_metrics()incalculate_sizing.pyto handle both original and new key names - Added support for new metric key names (cpu_usage, memory_usage, pod_count, storage_usage_pvc)
- Ensures correct display of sizing baseline values in the report
- The enhanced script maintains the original output structure expected by
calculate_sizing.py - New data is added under additional keys that don't interfere with existing functionality
- Original metric keys (
cpu,memory,pods,storage) are preserved alongside new keys (cpu_usage,memory_usage, etc.) - The script can now collect partial data (e.g., sizing only) if Prometheus metrics collection fails
- Default output filename changed to
cluster_data.jsonbut users can still specify any filename with--output
- Cluster Sizing Collection: Added functionality to collect and analyze node information
- Resource String Parsing: Added helper functions to parse Kubernetes resource strings
- Enhanced Error Handling: Script can now continue with partial data collection
- Backward Compatibility: Maintained compatibility with
calculate_sizing.py
- Changed default output filename to
cluster_data.json - Added
collect_cluster_sizing()function to gather node information - Added
parse_cpu()andparse_memory()helper functions - Modified output structure to include both metrics and sizing information
- Improved error handling to allow partial data collection
- Added more detailed summary output