Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 2.79 KB

File metadata and controls

55 lines (45 loc) · 2.79 KB

Enhanced Metrics Collection Development Log

Overview

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.

Goals

  1. Add functionality to collect actual cluster node sizing information (CPU, memory, instance types)
  2. Improve the output format to include both usage metrics and cluster sizing
  3. Maintain backward compatibility with calculate_sizing.py
  4. Improve error handling and user feedback

Implementation Plan

  1. Modify collect_metrics.py to add node sizing collection
  2. Ensure backward compatibility with existing calculate_sizing.py
  3. Test with various scenarios
  4. Document changes and usage

Changes Log

2023-11-15: Initial Implementation

  • 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

2023-11-15: Fixed Sizing Baseline Display

  • Fixed issue with sizing baseline display in the report
  • Modified load_metrics() in calculate_sizing.py to 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

Compatibility Notes

  • 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.json but users can still specify any filename with --output

Implementation Details

New Features

  1. Cluster Sizing Collection: Added functionality to collect and analyze node information
  2. Resource String Parsing: Added helper functions to parse Kubernetes resource strings
  3. Enhanced Error Handling: Script can now continue with partial data collection
  4. Backward Compatibility: Maintained compatibility with calculate_sizing.py

Key Changes

  1. Changed default output filename to cluster_data.json
  2. Added collect_cluster_sizing() function to gather node information
  3. Added parse_cpu() and parse_memory() helper functions
  4. Modified output structure to include both metrics and sizing information
  5. Improved error handling to allow partial data collection
  6. Added more detailed summary output