Debug prometheus blackbox exporter request


Forward port from blackbox export to local

k port-forward prometheus-blackbox-exporter-7ffcc8df74-67fxn 9115:9115

Check request

Add debug=true to request

curl -s "localhost:9115/probe?debug=true&target=https://devops.kyiv.ua&module=http_2xx"

Log outputs

Logs for the probe:
ts=2023-11-06T14:43:59.027680288Z caller=main.go:181 module=http_2xx target=https://devops.kyiv.ua level=info msg="Beginning probe" probe=http timeout_seconds=5
ts=2023-11-06T14:43:59.027780917Z caller=http.go:328 module=http_2xx target=https://devops.kyiv.ua level=info msg="Resolving target address" target=devops.kyiv.ua ip_protocol=ip4
ts=2023-11-06T14:43:59.059225868Z caller=http.go:328 module=http_2xx target=https://devops.kyiv.ua level=info msg="Resolved target address" target=devops.kyiv.ua ip=104.21.23.247
ts=2023-11-06T14:43:59.059292695Z caller=client.go:252 module=http_2xx target=https://devops.kyiv.ua level=info msg="Making HTTP request" url=https://104.21.23.247 host=devops.kyiv.ua
ts=2023-11-06T14:43:59.314988208Z caller=handler.go:120 module=http_2xx target=https://devops.kyiv.ua level=info msg="Received HTTP response" status_code=200
ts=2023-11-06T14:43:59.332912329Z caller=handler.go:120 module=http_2xx target=https://devops.kyiv.ua level=info msg="Response timings for roundtrip" roundtrip=0 start=2023-11-06T14:43:59.059346544Z dnsDone=2023-11-06T14:43:59.059346544Z connectDone=2023-11-06T14:43:59.071223264Z gotConn=2023-11-06T14:43:59.094155433Z responseStart=2023-11-06T14:43:59.314959843Z tlsStart=2023-11-06T14:43:59.071244926Z tlsDone=2023-11-06T14:43:59.094101056Z end=2023-11-06T14:43:59.332901735Z
ts=2023-11-06T14:43:59.332999184Z caller=main.go:181 module=http_2xx target=https://devops.kyiv.ua level=info msg="Probe succeeded" duration_seconds=0.305286819



Metrics that would have been returned:
# HELP probe_dns_lookup_time_seconds Returns the time taken for probe dns lookup in seconds
# TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.031458083
# HELP probe_duration_seconds Returns how long the probe took to complete in seconds
# TYPE probe_duration_seconds gauge
probe_duration_seconds 0.305286819
# HELP probe_failed_due_to_regex Indicates if probe failed due to regex
# TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 0
# HELP probe_http_content_length Length of http content response
# TYPE probe_http_content_length gauge
probe_http_content_length -1
# HELP probe_http_duration_seconds Duration of http request by phase, summed over all redirects
# TYPE probe_http_duration_seconds gauge
probe_http_duration_seconds{phase="connect"} 0.011876734
probe_http_duration_seconds{phase="processing"} 0.2208044
probe_http_duration_seconds{phase="resolve"} 0.031458083
probe_http_duration_seconds{phase="tls"} 0.022856132
probe_http_duration_seconds{phase="transfer"} 0.017941888
# HELP probe_http_redirects The number of redirects
# TYPE probe_http_redirects gauge
probe_http_redirects 0
# HELP probe_http_ssl Indicates if SSL was used for the final redirect
# TYPE probe_http_ssl gauge
probe_http_ssl 1
# HELP probe_http_status_code Response HTTP status code
# TYPE probe_http_status_code gauge
probe_http_status_code 200
# HELP probe_http_uncompressed_body_length Length of uncompressed response body
# TYPE probe_http_uncompressed_body_length gauge
probe_http_uncompressed_body_length 16279
# HELP probe_http_version Returns the version of HTTP of the probe response
# TYPE probe_http_version gauge
probe_http_version 2
# HELP probe_ip_addr_hash Specifies the hash of IP address. It's useful to detect if the IP address changes.
# TYPE probe_ip_addr_hash gauge
probe_ip_addr_hash 1.906238972e+09
# HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 4
# HELP probe_ssl_earliest_cert_expiry Returns last SSL chain expiry in unixtime
# TYPE probe_ssl_earliest_cert_expiry gauge
probe_ssl_earliest_cert_expiry 1.703840297e+09
# HELP probe_ssl_last_chain_expiry_timestamp_seconds Returns last SSL chain expiry in timestamp
# TYPE probe_ssl_last_chain_expiry_timestamp_seconds gauge
probe_ssl_last_chain_expiry_timestamp_seconds 1.703840297e+09
# HELP probe_ssl_last_chain_info Contains SSL leaf certificate information
# TYPE probe_ssl_last_chain_info gauge
probe_ssl_last_chain_info{fingerprint_sha256="d362646677ba8dd6aa9d42f8fd4b52207393aa694f86e845bad6d533daa7023b",issuer="CN=GTS CA 1P5,O=Google Trust Services LLC,C=US",subject="CN=devops.kyiv.ua",subjectalternative="devops.kyiv.ua,*.devops.kyiv.ua"} 1
# HELP probe_success Displays whether or not the probe was a success
# TYPE probe_success gauge
probe_success 1
# HELP probe_tls_version_info Returns the TLS version used or NaN when unknown
# TYPE probe_tls_version_info gauge
probe_tls_version_info{version="TLS 1.3"} 1



Module configuration:
prober: http
timeout: 5s
http:
  valid_http_versions:
  - HTTP/1.1
  - HTTP/2.0
  - HTTP/3.0
  preferred_ip_protocol: ip4
  ip_protocol_fallback: true
  fail_if_not_ssl: true
  fail_if_header_matches:
  - header: access-control-allow-origin
    regexp: \*
    allow_missing: true
  follow_redirects: true
  enable_http2: true
tcp:
  ip_protocol_fallback: true
icmp:
  ip_protocol_fallback: true
  ttl: 64
dns:
  ip_protocol_fallback: true
  recursion_desired: true