diff --git a/lib/promscrape/discovery/consul/watch.go b/lib/promscrape/discovery/consul/watch.go index e85a4869e..f5d60c4ea 100644 --- a/lib/promscrape/discovery/consul/watch.go +++ b/lib/promscrape/discovery/consul/watch.go @@ -5,6 +5,7 @@ import ( "flag" "fmt" "net/url" + "strings" "sync" "time" @@ -252,7 +253,8 @@ func shouldCollectServiceByName(filterServices []string, serviceName string) boo return true } for _, filterService := range filterServices { - if filterService == serviceName { + // Use case-insensitive comparison for service names according to https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1422 + if strings.EqualFold(filterService, serviceName) { return true } }