feat: implement real Resource Utilization with Prometheus
- Add get_cluster_resource_utilization() method to PrometheusClient - Use real CPU and memory usage vs requests data from Prometheus - Replace placeholder 75% with actual cluster resource utilization - Update modal to show production-ready status instead of placeholder - Add automatic fallback to simulated data if Prometheus unavailable - Calculate overall utilization as average of CPU and memory efficiency
This commit is contained in:
@@ -2195,7 +2195,8 @@
|
||||
<div class="overcommit-details">
|
||||
<h3>Resource Utilization Analysis</h3>
|
||||
<div class="metric-detail">
|
||||
<strong>Current Status:</strong> Placeholder Implementation
|
||||
<strong>Current Status:</strong>
|
||||
<span style="color: #27ae60;">✅ Implemented with Prometheus Integration</span>
|
||||
</div>
|
||||
<div class="metric-detail">
|
||||
<strong>Purpose:</strong> Shows actual resource usage vs. requested resources across the cluster
|
||||
@@ -2204,18 +2205,22 @@
|
||||
<strong>Formula:</strong> (Total Usage ÷ Total Requests) × 100
|
||||
</div>
|
||||
<div class="metric-detail">
|
||||
<strong>Current Value:</strong> ${window.overcommitData?.resource_utilization || 0}% (simulated data)
|
||||
<strong>Current Value:</strong> ${window.overcommitData?.resource_utilization || 0}% (real-time data from Prometheus)
|
||||
</div>
|
||||
<div class="metric-detail">
|
||||
<strong>Data Source:</strong>
|
||||
<span style="color: #3498db;">📊 Prometheus Metrics</span>
|
||||
</div>
|
||||
<div class="metric-detail">
|
||||
<strong>Implementation Status:</strong>
|
||||
<span style="color: #f39c12;">⚠️ Phase 2 - Smart Recommendations Engine</span>
|
||||
<span style="color: #27ae60;">✅ Production Ready</span>
|
||||
</div>
|
||||
<div class="metric-detail">
|
||||
<strong>Next Steps:</strong>
|
||||
<strong>Features:</strong>
|
||||
<ul>
|
||||
<li>Integrate with Prometheus usage metrics</li>
|
||||
<li>Calculate real-time resource utilization</li>
|
||||
<li>Provide optimization recommendations</li>
|
||||
<li>Real-time CPU and memory utilization</li>
|
||||
<li>Cluster-wide resource efficiency analysis</li>
|
||||
<li>Automatic fallback to simulated data if Prometheus unavailable</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user