client: emit max_memory metric (#11490)
This commit is contained in:
parent
7e1b2f1147
commit
1e2c9b3aa0
|
@ -2911,6 +2911,7 @@ func (c *Client) setGaugeForAllocationStats(nodeID string, baseLabels []metrics.
|
|||
|
||||
// Emit allocated
|
||||
metrics.SetGaugeWithLabels([]string{"client", "allocated", "memory"}, float32(allocated.Flattened.Memory.MemoryMB), baseLabels)
|
||||
metrics.SetGaugeWithLabels([]string{"client", "allocated", "max_memory"}, float32(allocated.Flattened.Memory.MemoryMaxMB), baseLabels)
|
||||
metrics.SetGaugeWithLabels([]string{"client", "allocated", "disk"}, float32(allocated.Shared.DiskMB), baseLabels)
|
||||
metrics.SetGaugeWithLabels([]string{"client", "allocated", "cpu"}, float32(allocated.Flattened.Cpu.CpuShares), baseLabels)
|
||||
|
||||
|
|
|
@ -9697,7 +9697,7 @@ func (a *Allocation) SetEventDisplayMessages() {
|
|||
//
|
||||
// COMPAT(0.11): Remove in 0.11
|
||||
func (a *Allocation) ComparableResources() *ComparableResources {
|
||||
// ALloc already has 0.9+ behavior
|
||||
// Alloc already has 0.9+ behavior
|
||||
if a.AllocatedResources != nil {
|
||||
return a.AllocatedResources.Comparable()
|
||||
}
|
||||
|
@ -9720,7 +9720,8 @@ func (a *Allocation) ComparableResources() *ComparableResources {
|
|||
CpuShares: int64(resources.CPU),
|
||||
},
|
||||
Memory: AllocatedMemoryResources{
|
||||
MemoryMB: int64(resources.MemoryMB),
|
||||
MemoryMB: int64(resources.MemoryMB),
|
||||
MemoryMaxMB: int64(resources.MemoryMaxMB),
|
||||
},
|
||||
Networks: resources.Networks,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue