From a4ed91f9b54997bad1e9dd73547ae9e55dba7d25 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Tue, 19 Jul 2022 18:17:12 +0300 Subject: [PATCH] [#1614] node: Update health metric on its change Signed-off-by: Pavel Karpy --- cmd/neofs-node/control.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/neofs-node/control.go b/cmd/neofs-node/control.go index 439050a0..e0cf1a65 100644 --- a/cmd/neofs-node/control.go +++ b/cmd/neofs-node/control.go @@ -70,6 +70,10 @@ func (c *cfg) NetmapStatus() control.NetmapStatus { func (c *cfg) setHealthStatus(st control.HealthStatus) { c.healthStatus.Store(int32(st)) + + if c.metricsCollector != nil { + c.metricsCollector.SetHealth(int32(st)) + } } func (c *cfg) HealthStatus() control.HealthStatus {