Open romap0 opened 4 years ago
Hmm, how does normal Prometheus scraping deal with this? Does Go even support these?
I'm not familiar with Go, but as I tested with net/http
module it works.
Okay, so likely our own resolution stuff can't handle this.
There's a third-party library for Go that deals with IDN.
The way we are dealing with it is by taking the IDN hostnames, applying the punycode transformation and passing that as the target to. For ping and DNS it's just a matter of applying punycode to the input. For TCP we have to split the hostname and the port. For HTTP we parse the URL, punycode the hostname and build a new URL. For DNS we are also transforming the query (so the BBE config has punycoded strings, not UTF8). Transforming regular hostnames using punycode yields back regular hostnames, so you don't have special cases.
The ugly part is that you see punycoded strings where you expect something else.
I could work on a PR to handle this inside BBE if we decide how to handle that case ("it's OK to see punycoded hostnames in logs", "I want to see UTF8 in logs", "...").
I wouldn't worry about the logs, there's an existing PR #640 which is having issues with some of the finer details.
Host operating system: output of
uname -a
Linux db6787aaa499 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 GNU/Linux
blackbox_exporter version: output of
blackbox_exporter -version
0.16.0
What is the blackbox.yml module config.
default
What is the prometheus.yml scrape config.
What logging output did you get from adding
&debug=true
to the probe URL?What did you do that produced an error?
What did you expect to see?
probe_success 1
What did you see instead?
probe_success 0