forked from TrueCloudLab/frostfs-node
[#1614] node: Update health metric on its change
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
581a9901c9
commit
a4ed91f9b5
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,10 @@ func (c *cfg) NetmapStatus() control.NetmapStatus {
|
||||||
|
|
||||||
func (c *cfg) setHealthStatus(st control.HealthStatus) {
|
func (c *cfg) setHealthStatus(st control.HealthStatus) {
|
||||||
c.healthStatus.Store(int32(st))
|
c.healthStatus.Store(int32(st))
|
||||||
|
|
||||||
|
if c.metricsCollector != nil {
|
||||||
|
c.metricsCollector.SetHealth(int32(st))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cfg) HealthStatus() control.HealthStatus {
|
func (c *cfg) HealthStatus() control.HealthStatus {
|
||||||
|
|
Loading…
Reference in a new issue