diff --git a/collectors/names_collector.go b/collectors/names_collector.go index eaa84cb..fb481e8 100644 --- a/collectors/names_collector.go +++ b/collectors/names_collector.go @@ -3,6 +3,7 @@ package collectors import ( "bufio" "os" + "strings" "github.com/DRuggeri/bind_query_exporter/util" "github.com/prometheus/client_golang/prometheus" @@ -126,7 +127,7 @@ func makeList(fileName string) (map[string]bool, error) { scanner := bufio.NewScanner(file) for scanner.Scan() { log.Debugln(" ", scanner.Text()) - result[scanner.Text()] = true + result[strings.ToLower(scanner.Text())] = true } if err := scanner.Err(); err != nil { diff --git a/util/LogMatcher.go b/util/LogMatcher.go index f1c269a..1a0fa7b 100644 --- a/util/LogMatcher.go +++ b/util/LogMatcher.go @@ -41,7 +41,7 @@ func (m LogMatcher) ExtractInfo(line string) LogMatch { if len(match) > 0 { result.Matched = true result.QueryClient = match[1] - result.QueryName = match[2] + result.QueryName = strings.ToLower(match[2]) result.QueryType = match[3] /* Check if we should avoid a DNS lookup since this name is not