Hi ,
      I am using the below yaml files for testing the post api using black 
box exorter.
expected result is  
probe_http_status_code value 200 the same thing checked using postman.
but i am getting probe_http_status_code value 415



blackbox. yml

http_post_2xx:
    prober: http
    http:
      method: POST
      headers:
        Content-Type: application/json;
      body: '{aaaa: "355987085036738",status: "Active"}

prometheus.yml
       - job_name: 'checkpost'
    scrape_interval: 45s
    metrics_path: /probe
    params:
      module: [http_post_2xx]  # Look for a HTTP 200 response.
    static_configs:
      - targets:
        - http://xxx.yyy/create
    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  # Blackbox exporter.

-- 
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/a7121c19-7ddd-4e84-a458-376eb7cb6f49%40googlegroups.com.

Reply via email to