Capacity Planner
The Capacity Planner analyzes historical CPU and memory usage trends to predict when a cluster’s or namespace’s resources will be exhausted — enabling proactive action before incidents occur.Linear Regression Algorithm
The Capacity Planner uses least-squares linear regression to project the resource exhaustion date.The algorithm requires at least 3 data points to generate a reliable projection. With fewer than 3 points, the planner returns
trend: insufficient_data.Data Structures
ResourceUsage
ResourceUsage
Represents a resource usage data point in time.
ResourceTrend
ResourceTrend
Linear regression result for a resource.
ForecastResult
ForecastResult
Exhaustion projection with recommendations.
Correlation with Incidents
TheResourceIsBottleneck method checks if a resource is related to active incidents:
IsBottleneck = true, the capacity recommendation is automatically prioritized and includes a reference to the active incident.
Recommendation Generation
The Capacity Planner generates recommendations based on projection urgency:How to Use
The Capacity Planner collects data every reconciliation cycle (30 seconds) and stores history in a ConfigMap (
chatcli-capacity-history). The regression is recalculated every 5 minutes.Noise Reducer
The Noise Reducer implements four alert suppression strategies to reduce alert fatigue and improve the signal-to-noise ratio.Strategy 1: Repetitive Suppression
Suppresses identical alerts when there is accumulation without state change.Strategy 2: Seasonal Patterns
Identifies and suppresses alerts that occur at predictable times (e.g., cleanup jobs, scheduled deploys). SeasonalPattern struct:
Detection Algorithm:
- ConfigMap update job runs every Monday at 03:00
- Generates
pod_restartalert in thejobsnamespace - After 4 weeks: pattern identified (Monday, 03:00, confidence 0.75)
- From the 5th week: alert automatically suppressed
chatcli-seasonal-patterns.
Strategy 3: Flap Detection
Detects resources that oscillate between states (resolved -> detected -> resolved) repeatedly.Strategy 4: Alert Fatigue Scoring
Calculates an alert fatigue score (0-100) to determine if alert volume is excessive.Cost Tracker
The Cost Tracker tracks operational costs (LLM + downtime) and calculates AIOps automation ROI.LLM Costs per Provider
The cost of each LLM call is calculated based on tokens consumed and configured prices per provider:Cost Configuration
Prices are configurable via ConfigMapchatcli-cost-config:
If the ConfigMap does not exist, default values are used. ConfigMap updates are reflected in real time (watch on ConfigMap).
IncidentCost
Total cost of an incident, decomposed into components:
CostBreakdown:
Calculation example:
CostSummary
Cost aggregation for a period:ROI Calculation
ROI is calculated by comparing automation cost with the estimated cost of manual resolution:
Monthly ROI example:
ROI typically exceeds 100,000% because the cost of LLM calls ($0.03-0.10 per incident) is orders of magnitude lower than the cost of manual resolution (2h of engineer time + downtime).
Storage Architecture (ConfigMaps)
All Capacity Planner, Noise Reducer, and Cost Tracker data is persisted in ConfigMaps in the operator namespace:Storage Format
Integrations
REST API
Endpoints
/api/v1/analytics/remediation-stats and /api/v1/analytics/summary expose cost and capacity data.Web Dashboard
The Overview view displays ROI metrics and capacity projections in real time.
Grafana
The
remediation-stats.json dashboard includes cost and ROI panels.AIOps Platform
Complete AIOps pipeline architecture and how these subsystems integrate.