Change API of Node HealthState

This commit is contained in:
2026-02-03 14:55:12 +01:00
parent 00a41373e8
commit 248f11f4f8
3 changed files with 30 additions and 102 deletions

View File

@@ -79,7 +79,7 @@ func (api *RestAPI) updateNodeStates(rw http.ResponseWriter, r *http.Request) {
ms := metricstore.GetMemoryStore()
m := make(map[string][]string)
healthStates := make(map[string]metricstore.NodeHealthState)
healthStates := make(map[string]schema.MonitoringState)
for _, node := range req.Nodes {
if sc, err := archive.GetSubClusterByNode(req.Cluster, node.Hostname); err == nil {
@@ -101,7 +101,7 @@ func (api *RestAPI) updateNodeStates(rw http.ResponseWriter, r *http.Request) {
state := determineState(node.States)
healthState := schema.MonitoringStateFull
if hs, ok := healthStates[node.Hostname]; ok {
healthState = hs.Status
healthState = hs
}
nodeState := schema.NodeStateDB{
TimeStamp: requestReceived,