diff --git a/client/client.go b/client/client.go index f1022f444285..7a346e1a0f84 100644 --- a/client/client.go +++ b/client/client.go @@ -2085,6 +2085,11 @@ func (c *Client) emitStats() { // is ready c.baseLabels = []metrics.Label{{Name: "node_id", Value: c.NodeID()}, {Name: "datacenter", Value: c.Datacenter()}} + // Add node_class if it's configured + if node := c.Node(); node.NodeClass != "" { + c.baseLabels = append(c.baseLabels, metrics.Label{Name: "node_class", Value: node.NodeClass}) + } + // Start collecting host stats right away and then keep collecting every // collection interval next := time.NewTimer(0)