mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/promscrape/discovery/consul: use case-insensitive comparison for service names
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1424
This commit is contained in:
parent
61e483a01c
commit
6fc3696260
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -252,7 +253,8 @@ func shouldCollectServiceByName(filterServices []string, serviceName string) boo
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
for _, filterService := range filterServices {
|
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
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue