diff --git a/client/client.go b/client/client.go index e27d2d62caf6..f24b0f590f0d 100644 --- a/client/client.go +++ b/client/client.go @@ -1870,7 +1870,15 @@ DISCOLOOP: func (c *Client) emitStats() { // Assign labels directly before emitting stats so the information expected // is ready - c.baseLabels = []metrics.Label{{Name: "node_id", Value: c.NodeID()}, {Name: "datacenter", Value: c.Datacenter()}} + var emittedNodeClass string + if emittedNodeClass = c.config.Node.NodeClass; emittedNodeClass == "" { + emittedNodeClass = "none" + } + c.baseLabels = []metrics.Label{ + {Name: "node_id", Value: c.NodeID()}, + {Name: "datacenter", Value: c.Datacenter()}, + {Name: "node_class", Value: emittedNodeClass}, + } // Start collecting host stats right away and then keep collecting every // collection interval