lib/promscrape/discovery/consul: use case-insensitive comparison for service names

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1424
This commit is contained in:
Aliaksandr Valialkin 2021-07-02 14:48:16 +03:00
parent 6e406083f2
commit 7088f17494

View File

@ -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
}
}