Body seems not being proparly processed?

22 views
Skip to first unread message

Danny de Waard

unread,
Apr 19, 2021, 1:51:06 AM4/19/21
to Prometheus Users
I have a blackbox entry like:
  http_post_2xx_basics:
    prober: http
    timeout: 5s
    http:
      headers:
        User-Agent: "blackbox-monitoring"
        Content-Type: "application/json"
        Accept: "application/json"
        Private-ApiKey: "myAPIKey"
        Body: '{"some_arrangements": [{"arrangement_number": "0004074331","administration_code": "1006"}]}'
      valid_status_codes:
      - 200
      method: POST

And i call the entry via prometheus scrape:
  - job_name: blackbox_api_basics
    scrape_interval: 60s
    metrics_path: /probe
    params:
      module: [http_post_2xx_basics]
    static_configs:
        labels:
          name: 'Basic details'
    relabel_configs:
     - source_labels: [__address__]
       target_label: __param_target
     - source_labels: [__param_target]
       target_label: instance
     - target_label: __address__
       replacement: 127.0.0.1:9115 # The blackbox exporter.

But i always get a http 400 back.
In postman the same call returns a neat 200 ?
Is there something that needs quoting/unquoting or something?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages