From 47e986c26fbc9fa41678e59670b7b939bed8bdb7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 6 Mar 2020 19:26:17 +0200 Subject: [PATCH] app/vmagent: properly add labels set via `-remoteWrite.label` to metrics before sending them to `-remoteWrite.url` --- app/vmagent/remotewrite/remotewrite.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmagent/remotewrite/remotewrite.go b/app/vmagent/remotewrite/remotewrite.go index ed2f5fb08..b21a5bbab 100644 --- a/app/vmagent/remotewrite/remotewrite.go +++ b/app/vmagent/remotewrite/remotewrite.go @@ -89,7 +89,7 @@ func Stop() { // Each timeseries in wr.Timeseries must contain one sample. func Push(wr *prompbmarshal.WriteRequest) { var rctx *relabelCtx - if len(prcsGlobal) > 0 { + if len(prcsGlobal) > 0 || len(labelsGlobal) > 0 { rctx = getRelabelCtx() } tss := wr.Timeseries