From c6741ba2097444ba258ceb4ae46e259c9844a41f Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Thu, 19 Dec 2024 20:38:20 +0100 Subject: [PATCH] Use shorted hostname for hostname added by router --- internal/metricRouter/metricRouter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/metricRouter/metricRouter.go b/internal/metricRouter/metricRouter.go index a3b41c4..e30e436 100644 --- a/internal/metricRouter/metricRouter.go +++ b/internal/metricRouter/metricRouter.go @@ -162,7 +162,7 @@ func (r *metricRouter) Init(ticker mct.MultiChanTicker, wg *sync.WaitGroup, rout } r.mp.SetNormalizeUnits(r.config.NormalizeUnits) - r.mp.AddAddTagsByCondition("true", r.config.HostnameTagName, hostname) + r.mp.AddAddTagsByCondition("true", r.config.HostnameTagName, r.hostname) // r.config.dropMetrics = make(map[string]bool) // for _, mname := range r.config.DropMetrics {