update state to up

This commit is contained in:
lsy1990 2022-07-30 22:30:57 +08:00
parent 77ed17bbe4
commit a81cdb4687
1 changed files with 3 additions and 2 deletions

View File

@ -185,9 +185,10 @@ func (ins *Instance) gatherNodeData(n node, slist *types.SampleList) error {
tags["arch"] = monitorData.HudsonNodeMonitorsArchitectureMonitor
}
tags["status"] = "online"
if n.Offline {
tags["status"] = "offline"
slist.PushSample(inputName, "up", 0, tags)
} else {
slist.PushSample(inputName, "up", 1, tags)
}
tags["source"] = ins.Source