From 74f8e12e871dfc25e6528a2297a68e0eabec1e6d Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Fri, 26 Aug 2022 16:22:37 -0700 Subject: [PATCH] Support "HTTP" and "HTTPS" schemes (#3019) * Support "HTTP" and "HTTPS" schemes * Update lib/promscrape/config.go Co-authored-by: Aliaksandr Valialkin --- lib/promscrape/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/promscrape/config.go b/lib/promscrape/config.go index afd611872..d193b4b8f 100644 --- a/lib/promscrape/config.go +++ b/lib/promscrape/config.go @@ -4,7 +4,6 @@ import ( "encoding/json" "flag" "fmt" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/auth" "net/url" "path/filepath" "sort" @@ -13,6 +12,7 @@ import ( "sync" "time" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/auth" "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup" "github.com/VictoriaMetrics/VictoriaMetrics/lib/envtemplate" @@ -904,7 +904,7 @@ func getScrapeWorkConfig(sc *ScrapeConfig, baseDir string, globalCfg *GlobalConf if metricsPath == "" { metricsPath = "/metrics" } - scheme := sc.Scheme + scheme := strings.ToLower(sc.Scheme) if scheme == "" { scheme = "http" }