mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge pull request #6349 from hashicorp/b-host-stats
client: Return empty values when host stats fail
This commit is contained in:
@@ -1335,10 +1335,14 @@ func (tr *TaskRunner) emitStats(ru *cstructs.TaskResourceUsage) {
|
||||
|
||||
if ru.ResourceUsage.MemoryStats != nil {
|
||||
tr.setGaugeForMemory(ru)
|
||||
} else {
|
||||
tr.logger.Debug("Skipping memory stats for allocation", "reason", "MemoryStats is nil")
|
||||
}
|
||||
|
||||
if ru.ResourceUsage.CpuStats != nil {
|
||||
tr.setGaugeForCPU(ru)
|
||||
} else {
|
||||
tr.logger.Debug("Skipping cpu stats for allocation", "reason", "CpuStats is nil")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user