mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
Merge pull request #3265 from hashicorp/f-refactor-emit-client-metrics
Move setGaugeForAllocationStats to emitClientMetrics
This commit is contained in:
@@ -2039,15 +2039,14 @@ func (c *Client) emitHostStats() {
|
||||
c.setGaugeForUptime(hStats)
|
||||
c.setGaugeForCPUStats(nodeID, hStats)
|
||||
c.setGaugeForDiskStats(nodeID, hStats)
|
||||
|
||||
// TODO: This should be moved to emitClientMetrics
|
||||
c.setGaugeForAllocationStats(nodeID)
|
||||
}
|
||||
|
||||
// emitClientMetrics emits lower volume client metrics
|
||||
func (c *Client) emitClientMetrics() {
|
||||
nodeID := c.NodeID()
|
||||
|
||||
c.setGaugeForAllocationStats(nodeID)
|
||||
|
||||
// Emit allocation metrics
|
||||
blocked, migrating, pending, running, terminal := 0, 0, 0, 0, 0
|
||||
for _, ar := range c.getAllocRunners() {
|
||||
|
||||
Reference in New Issue
Block a user