@@ -96,38 +96,38 @@ type NodeStats struct {
9696
9797// ClusterStatus represents the overall cluster health status
9898type ClusterStatus struct {
99- Timestamp time.Time `json:"timestamp"`
100- OverallHealth HealthStatus `json:"overallHealth"`
101- TotalNodes int `json:"totalNodes"`
102- HealthyNodes int `json:"healthyNodes"`
103- DegradedNodes int `json:"degradedNodes"`
104- CriticalNodes int `json:"criticalNodes"`
105- UnknownNodes int `json:"unknownNodes"`
106- ActiveProblems int `json:"activeProblems"`
107- Correlations int `json:"activeCorrelations"`
108- NodeSummaries []NodeSummary `json:"nodeSummaries,omitempty"`
109- RecentProblems []ClusterProblem `json:"recentProblems,omitempty"`
99+ Timestamp time.Time `json:"timestamp"`
100+ OverallHealth HealthStatus `json:"overallHealth"`
101+ TotalNodes int `json:"totalNodes"`
102+ HealthyNodes int `json:"healthyNodes"`
103+ DegradedNodes int `json:"degradedNodes"`
104+ CriticalNodes int `json:"criticalNodes"`
105+ UnknownNodes int `json:"unknownNodes"`
106+ ActiveProblems int `json:"activeProblems"`
107+ Correlations int `json:"activeCorrelations"`
108+ NodeSummaries []NodeSummary `json:"nodeSummaries,omitempty"`
109+ RecentProblems []ClusterProblem `json:"recentProblems,omitempty"`
110110}
111111
112112// NodeSummary provides a brief overview of a node's status
113113type NodeSummary struct {
114- NodeName string `json:"nodeName"`
115- Health HealthStatus `json:"health"`
116- LastReportAt time.Time `json:"lastReportAt"`
117- ProblemCount int `json:"problemCount"`
118- ConditionCount int `json:"conditionCount"`
114+ NodeName string `json:"nodeName"`
115+ Health HealthStatus `json:"health"`
116+ LastReportAt time.Time `json:"lastReportAt"`
117+ ProblemCount int `json:"problemCount"`
118+ ConditionCount int `json:"conditionCount"`
119119}
120120
121121// ClusterProblem represents a problem affecting the cluster
122122type ClusterProblem struct {
123- ID string `json:"id"`
124- Type string `json:"type"`
125- Severity string `json:"severity"`
126- AffectedNodes []string `json:"affectedNodes"`
127- Message string `json:"message"`
128- DetectedAt time.Time `json:"detectedAt"`
129- IsCorrelated bool `json:"isCorrelated"`
130- CorrelationID string `json:"correlationId,omitempty"`
123+ ID string `json:"id"`
124+ Type string `json:"type"`
125+ Severity string `json:"severity"`
126+ AffectedNodes []string `json:"affectedNodes"`
127+ Message string `json:"message"`
128+ DetectedAt time.Time `json:"detectedAt"`
129+ IsCorrelated bool `json:"isCorrelated"`
130+ CorrelationID string `json:"correlationId,omitempty"`
131131}
132132
133133// =====================
@@ -162,16 +162,16 @@ type ReportSummary struct {
162162
163163// Correlation represents a detected pattern across multiple nodes
164164type Correlation struct {
165- ID string `json:"id"`
166- Type string `json:"type"` // infrastructure, common-cause, cascade
167- Severity string `json:"severity"`
168- AffectedNodes []string `json:"affectedNodes"`
169- ProblemTypes []string `json:"problemTypes"`
170- Message string `json:"message"`
171- DetectedAt time.Time `json:"detectedAt"`
172- UpdatedAt time.Time `json:"updatedAt"`
173- Status string `json:"status"` // active, resolved, investigating
174- Confidence float64 `json:"confidence"`
165+ ID string `json:"id"`
166+ Type string `json:"type"` // infrastructure, common-cause, cascade
167+ Severity string `json:"severity"`
168+ AffectedNodes []string `json:"affectedNodes"`
169+ ProblemTypes []string `json:"problemTypes"`
170+ Message string `json:"message"`
171+ DetectedAt time.Time `json:"detectedAt"`
172+ UpdatedAt time.Time `json:"updatedAt"`
173+ Status string `json:"status"` // active, resolved, investigating
174+ Confidence float64 `json:"confidence"`
175175 Metadata map [string ]interface {} `json:"metadata,omitempty"`
176176}
177177
@@ -194,7 +194,7 @@ type LeaseResponse struct {
194194 Approved bool `json:"approved"`
195195 ExpiresAt time.Time `json:"expiresAt,omitempty"`
196196 Message string `json:"message,omitempty"`
197- RetryAt time.Time `json:"retryAt,omitempty"` // when to retry if denied
197+ RetryAt time.Time `json:"retryAt,omitempty"` // when to retry if denied
198198 Position int `json:"position,omitempty"` // queue position if waiting
199199}
200200
@@ -279,34 +279,34 @@ type StorageConfig struct {
279279
280280// CorrelationConfig contains correlation engine settings
281281type CorrelationConfig struct {
282- Enabled bool `json:"enabled" yaml:"enabled"`
283- ClusterWideThreshold float64 `json:"clusterWideThreshold" yaml:"clusterWideThreshold"`
284- EvaluationInterval time.Duration `json:"evaluationInterval" yaml:"evaluationInterval"`
285- MinNodesForCorrelation int `json:"minNodesForCorrelation" yaml:"minNodesForCorrelation"`
282+ Enabled bool `json:"enabled" yaml:"enabled"`
283+ ClusterWideThreshold float64 `json:"clusterWideThreshold" yaml:"clusterWideThreshold"`
284+ EvaluationInterval time.Duration `json:"evaluationInterval" yaml:"evaluationInterval"`
285+ MinNodesForCorrelation int `json:"minNodesForCorrelation" yaml:"minNodesForCorrelation"`
286286}
287287
288288// CoordinationConfig contains remediation coordination settings
289289type CoordinationConfig struct {
290- Enabled bool `json:"enabled" yaml:"enabled"`
291- MaxConcurrentRemediations int `json:"maxConcurrentRemediations" yaml:"maxConcurrentRemediations"`
292- DefaultLeaseDuration time.Duration `json:"defaultLeaseDuration" yaml:"defaultLeaseDuration"`
293- CooldownPeriod time.Duration `json:"cooldownPeriod" yaml:"cooldownPeriod"`
290+ Enabled bool `json:"enabled" yaml:"enabled"`
291+ MaxConcurrentRemediations int `json:"maxConcurrentRemediations" yaml:"maxConcurrentRemediations"`
292+ DefaultLeaseDuration time.Duration `json:"defaultLeaseDuration" yaml:"defaultLeaseDuration"`
293+ CooldownPeriod time.Duration `json:"cooldownPeriod" yaml:"cooldownPeriod"`
294294}
295295
296296// PrometheusConfig contains Prometheus metrics configuration
297297type PrometheusConfig struct {
298- Enabled bool `json:"enabled" yaml:"enabled"`
299- Port int `json:"port" yaml:"port"`
298+ Enabled bool `json:"enabled" yaml:"enabled"`
299+ Port int `json:"port" yaml:"port"`
300300 Path string `json:"path" yaml:"path"`
301301}
302302
303303// KubernetesConfig contains Kubernetes integration settings
304304type KubernetesConfig struct {
305- Enabled bool `json:"enabled" yaml:"enabled"`
306- Kubeconfig string `json:"kubeconfig" yaml:"kubeconfig"`
307- InCluster bool `json:"inCluster" yaml:"inCluster"`
308- Namespace string `json:"namespace" yaml:"namespace"`
309- CreateEvents bool `json:"createEvents" yaml:"createEvents"`
305+ Enabled bool `json:"enabled" yaml:"enabled"`
306+ Kubeconfig string `json:"kubeconfig" yaml:"kubeconfig"`
307+ InCluster bool `json:"inCluster" yaml:"inCluster"`
308+ Namespace string `json:"namespace" yaml:"namespace"`
309+ CreateEvents bool `json:"createEvents" yaml:"createEvents"`
310310}
311311
312312// DefaultControllerConfig returns a configuration with sensible defaults
@@ -324,10 +324,10 @@ func DefaultControllerConfig() *ControllerConfig {
324324 Retention : 30 * 24 * time .Hour , // 30 days
325325 },
326326 Correlation : CorrelationConfig {
327- Enabled : true ,
328- ClusterWideThreshold : 0.3 , // 30% of nodes
329- EvaluationInterval : 30 * time .Second ,
330- MinNodesForCorrelation : 2 ,
327+ Enabled : true ,
328+ ClusterWideThreshold : 0.3 , // 30% of nodes
329+ EvaluationInterval : 30 * time .Second ,
330+ MinNodesForCorrelation : 2 ,
331331 },
332332 Coordination : CoordinationConfig {
333333 Enabled : true ,
0 commit comments