mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-11 13:31:45 +01:00
Add debug log with degrade and missing metrics for healthcheck
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
cclog "github.com/ClusterCockpit/cc-lib/v2/ccLogger"
|
||||
"github.com/ClusterCockpit/cc-lib/v2/schema"
|
||||
)
|
||||
|
||||
@@ -246,6 +247,14 @@ func (m *MemoryStore) HealthCheck(cluster string,
|
||||
degradedCount = len(degradedList)
|
||||
healthyCount = len(expectedMetrics) - (missingCount + degradedCount)
|
||||
|
||||
// Debug log missing and degraded metrics
|
||||
if missingCount > 0 {
|
||||
cclog.ComponentDebug("metricstore", "HealthCheck: node", hostname, "missing metrics:", missingList)
|
||||
}
|
||||
if degradedCount > 0 {
|
||||
cclog.ComponentDebug("metricstore", "HealthCheck: node", hostname, "degraded metrics:", degradedList)
|
||||
}
|
||||
|
||||
// Determine overall health status
|
||||
if missingCount > 0 || degradedCount > 0 {
|
||||
if healthyCount == 0 {
|
||||
|
||||
Reference in New Issue
Block a user