Blackbox return probe_success 0, but the website is up

565 views
Skip to first unread message

Mohamed Boukhlif

unread,
Mar 5, 2021, 4:27:33 AM3/5/21
to Prometheus Users
Hi everyone,

I'm getting probe_success 0 but my site is up, any help please.
Here is my config : 
config.yml
modules:
  http_2xx:
    prober: http
  http_post_2xx:
    prober: http
    http:
      method: POST
  tcp_connect:
    prober: tcp
  pop3s_banner:
    prober: tcp
    tcp:
      query_response:
      - expect: "^+OK"
      tls: true
      tls_config:
        insecure_skip_verify: false
  ssh_banner:
    prober: tcp
    tcp:
      query_response:
      - expect: "^SSH-2.0-"
  irc_banner:
    prober: tcp
    tcp:
      query_response:
      - send: "NICK prober"
      - send: "USER prober prober prober :prober"
      - expect: "PING :([^ ]+)"
        send: "PONG ${1}"
      - expect: "^:[^ ]+ 001"
  icmp:
    prober: icmp

prometheus.yml
  - job_name: 'blackbox'
    metrics_path: /probe
    params:
      module: [http_2xx]
    static_configs:
      - targets:
        - https://mywebsite.com
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: blackbox:9115 

Evelyn Pereira Souza

unread,
Mar 5, 2021, 5:48:27 AM3/5/21
to promethe...@googlegroups.com
On 05.03.21 10:27, Mohamed Boukhlif wrote:
> Hi everyone,
>
> I'm getting probe_success 0 but my site is up, any help please.
> Here is my config :
(...)
>
> *prometheus.yml*
>   - job_name: 'blackbox'
>     metrics_path: /probe
>     params:
>       module: [http_2xx]
>     static_configs:
>       - targets:
>         - https://mywebsite.com
>     relabel_configs:
>       - source_labels: [__address__]
>         target_label: __param_target
>       - source_labels: [__param_target]
>         target_label: instance
>       - target_label: __address__
>         replacement: blackbox:9115


Hi Mohamed

please add &debug=true to the probe URL, for example
http://localhost:9115/probe?module=http_2xx&target=https://mywebsite.com/&debug=true
and post the result here.

kind regards
Evelyn
OpenPGP_0x61776FA8E38403FB.asc
OpenPGP_signature

Mohamed Boukhlif

unread,
Mar 5, 2021, 6:12:23 AM3/5/21
to Prometheus Users
Hi Evelyn,

Here are the logs :
ts=2021-03-05T11:00:25.241003327Z caller=main.go:304 module=http_2xx target=https://mywebsite.com level=info msg="Beginning probe" probe=http timeout_seconds=9.5
ts=2021-03-05T11:00:25.241228295Z caller=http.go:342 module=http_2xx target=https://mywebsite.com level=info msg="Resolving target address" ip_protocol=ip6 
ts=2021-03-05T11:00:25.242954198Z caller=http.go:342 module=http_2xx target=https://mywebsite.com level=info msg="Resolved target address" ip=2001:XXXX::10 
ts=2021-03-05T11:00:25.243051798Z caller=client.go:252 module=http_2xx target=https://mywebsite.com level=info msg="Making HTTP request" url=https://[2001:XXXX::10] host=mywebsite.com
ts=2021-03-05T11:00:25.243354351Z caller=main.go:119 module=http_2xx target=https://mywebsite.com level=error msg="Error for HTTP request" err="Get \"https://[2001:XXXX::10]\": dial tcp [2001:XXXX::10]:443: connect: cannot assign requested address"
ts=2021-03-05T11:00:25.24340739Z caller=main.go:119 module=http_2xx target=https://mywebsite.com level=info msg="Response timings for roundtrip" roundtrip=0 start=2021-03-05T11:00:25.243191401Z dnsDone=2021-03-05T11:00:25.243191401Z connectDone=2021-03-05T11:00:25.243301653Z gotConn=0001-01-01T00:00:00Z responseStart=0001-01-01T00:00:00Z end=0001-01-01T00:00:00Z
ts=2021-03-05T11:00:25.24348001Z caller=main.go:304 module=http_2xx target=https://mywebsite.com level=error msg="Probe failed" duration_seconds=0.002416975


Thank you,

Mohamed Boukhlif

unread,
Mar 5, 2021, 6:23:11 AM3/5/21
to Prometheus Users
Thank you, I solved it,

There was an issue with IPv6, I've added this line and it worked
preferred_ip_protocol: "ip4"

Thanks Evelyn.

Reply all
Reply to author
Forward
0 new messages