Black box exporter module http_post_2xx not working.

1,133 views
Skip to first unread message

Pooja Chauhan

unread,
May 4, 2020, 11:29:44 AM5/4/20
to Prometheus Users
Hi ,
I tried to use module http_post_2xx but seems it does not work ,instead http_2xx is being used.I dont how ,in module section i have mentioned http_post_2xx :

Prometheus.yml  :

  - job_name: 'Monitorining'
    metrics_path: /probe
    params:
      module: [http_post_2xx]
    static_configs:
      - targets:
        - https://---------------
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: localhost:9115 # blackbox exporter

blackbox.yml:

modules:
  http_2xx:
    prober: http
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: []  # Defaults to 2xx
      method: GET

  http_post_2xx:
    prober: http
    timeout: 5s
    http:
      valid_status_codes: [200,301]
      method: POST
      headers:
        Host: "----------------"
        Cache-Control: no-cache
        Content-Type: application/json
      basic_auth:
        username: '------------'
        password: '-------------'

Error:
curl -s "localhost:9115/probe?module=http_post_2xx&target=https://----------------------&debug=true" | grep -v \#
Unknown module "http_post_2xx"


Please suggest.







Brian Candler

unread,
May 4, 2020, 12:51:23 PM5/4/20
to Prometheus Users
Perhaps you didn't restart blackbox_exporter after editing its config file?  Or it's reading a different config file?

Clemente Machado

unread,
Aug 25, 2021, 11:45:53 PM8/25/21
to Prometheus Users
Hello how are you ?

Did you make your blackbox monitor login to your API via POST?
Reply all
Reply to author
Forward
0 new messages