From 032e76f31ef1def4a5a596e16158fe5fbc381f53 Mon Sep 17 00:00:00 2001 From: Josh Powers Date: Mon, 27 Nov 2023 08:40:20 -0700 Subject: [PATCH] fix(inputs.http): Use correct token variable fixes: #14347 --- plugins/inputs/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/http/http.go b/plugins/inputs/http/http.go index fec583d52566b..713489b6dfb0b 100644 --- a/plugins/inputs/http/http.go +++ b/plugins/inputs/http/http.go @@ -128,7 +128,7 @@ func (h *HTTP) gatherURL(acc telegraf.Accumulator, url string) error { token.Destroy() request.Header.Set("Authorization", bearer) } else if h.TokenFile != "" { - token, err := os.ReadFile(h.BearerToken) + token, err := os.ReadFile(h.TokenFile) if err != nil { return err }