Skip to content

Commit

Permalink
debug collectNodeMetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlo Sumkin committed Oct 22, 2023
1 parent 0f5251a commit 5cc23e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions connectors/kubernetes-connector/kubernetesConnector.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ func (connector *KubernetesConnector) Collect() (
slices.SortFunc(hostGroups, func(a, b transit.ResourceGroup) int { return cmp.Compare(a.GroupName, b.GroupName) })
slices.SortFunc(inventory, func(a, b transit.InventoryResource) int { return cmp.Compare(a.Name, b.Name) })

log.Debug().Interface("state", state).Interface("monitored", monitored).
Msg("__ Collect")

return inventory, monitored, hostGroups, nil
}

Expand Down Expand Up @@ -417,6 +420,9 @@ func (connector *KubernetesConnector) collectNodeInventory(state *MonitoredState
}
}
state.State[stateKey] = resource

log.Debug().Interface("resource", resource).
Msgf("__ collectNodeInventory %v", stateKey)
}
return nil
}
Expand Down Expand Up @@ -586,6 +592,9 @@ func (connector *KubernetesConnector) collectNodeMetrics(state *MonitoredState)
}
}
state.State[stateKey] = resource

log.Debug().Interface("resource", resource).
Msgf("__ collectNodeMetrics %v", stateKey)
} else if _, ok = state.Mismatched[stateKey]; !ok {
log.Warn().Msgf("node not found in monitored state: %v", stateKey)
}
Expand Down

0 comments on commit 5cc23e9

Please sign in to comment.