blackbox.yml :
modules:
http_2xx:
prober: http
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2"]
valid_status_codes: []
method: GET
http_3xx:
prober: http
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2"]
valid_status_codes: [302,304,301] # Defaults to 2xx
no_follow_redirects: true
method: GET
When i am doing manual check using the debug step i am getting late
response in some cases and also some time probe success as 0 even if the
url is up .
$ curl -s
"localhost:9115/probe?debug=true&target=https://foo.example.com&module=http_3xx"
| grep -v \#
Logs for the probe:
ts=2020-07-11T08:14:45.652556074Z caller=main.go:304 module=http_3xx
target=https://foo.example.com level=info msg="Beginning probe" probe=http
timeout_seconds=119.5
ts=2020-07-11T08:14:45.652666819Z caller=http.go:323 module=http_3xx
target=https://foo.example.com level=info msg="Resolving target address"
ip_protocol=ip6
ts=2020-07-11T08:14:45.652924988Z caller=http.go:323 module=http_3xx
target=https://foo.example.com level=info msg="Resolved target address"
ip=10.50.200.70
ts=2020-07-11T08:14:45.652973246Z caller=client.go:252 module=http_3xx
target=https://foo.example.com level=info msg="Making HTTP request"
url=https://0.0.00.0 host=https://foo.example.com
ts=2020-07-11T08:16:45.152652862Z caller=main.go:119 module=http_3xx
target=https://foo.example.com level=error msg="Error for HTTP request"
err="Get \"https://0.0.00.0\": context deadline exceeded"
ts=2020-07-11T08:16:45.152700889Z caller=main.go:119 module=http_3xx
target=https://foo.example.com level=info msg="Response timings for
roundtrip" roundtrip=0 start=2020-07-11T08:14:45.653032203Z
dnsDone=2020-07-11T08:14:45.653032203Z
connectDone=2020-07-11T08:16:45.152647141Z gotConn=0001-01-01T00:00:00Z
responseStart=0001-01-01T00:00:00Z end=0001-01-01T00:00:00Z
ts=2020-07-11T08:16:45.152728204Z caller=main.go:304 module=http_3xx
target=https://foo.example.com level=error msg="Probe failed"
duration_seconds=119.500129397
Metrics that would have been returned:
probe_dns_lookup_time_seconds 0.000264448
probe_duration_seconds 119.500129397
probe_failed_due_to_regex 0
probe_http_content_length 0
probe_http_duration_seconds{phase="connect"} 0
probe_http_duration_seconds{phase="processing"} 0
probe_http_duration_seconds{phase="resolve"} 0.000264448
probe_http_duration_seconds{phase="tls"} 0
probe_http_duration_seconds{phase="transfer"} 0
probe_http_redirects 0
probe_http_ssl 0
probe_http_status_code 0
probe_http_uncompressed_body_length 0
probe_http_version 0
probe_ip_addr_hash 1.699831243e+09
probe_ip_protocol 4
probe_success 0
Module configuration:
prober: http
http:
valid_status_codes:
- 302
- 304
- 301
valid_http_versions:
- HTTP/1.1
- HTTP/2
ip_protocol_fallback: true
no_follow_redirects: true
method: GET
tcp:
ip_protocol_fallback: true
icmp:
ip_protocol_fallback: true
dns:
ip_protocol_fallback: true
On Saturday, July 11, 2020 at 12:18:48 AM UTC+5:30, Brian Candler wrote:
>
> You haven't shown the most important bit, which is your blackbox_exporter
> config where you've defined the http_3xx module.
>
> Also, show the result if you scrape blackbox_exporter manually using curl:
>
> curl 'localhost:9115/probe?target=https://foo.example.com
> <https://www.google.com/url?q=https%3A%2F%2Ffoo.example.com&sa=D&sntz=1&usg=AFQjCNFJKv0QboSl12xpTBffzYF9XkJ1JQ>
> &module=http_3xx'
>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/38bc9496-bd52-4a7e-a8db-f32568167d01o%40googlegroups.com.