title: How to configurate http_post_2xx in blackbox exporter?
body: <p>I am new to Prometheus, and I have been trying to set up blackbox exporter for monitoring my server by the <strong>http_post_2xx</strong> module but not http_2xx module. However, given so much researching on the internet, I still do not figure out.</p>
  
  <p>Here is the background of my situation: I used to monitor my website available or not by Postman. After sending a post request, I should be able to receive a signal indicating the status is 200 OK or could not get any response, manually. This is ineffective and unresponsible as I should not be noticed an error from my website-visitor but not myself. Therefore, I turn to Prometheus.</p>
  
  <p>Blackbox exporter seems like my solution. I build blackbox exporter on my server, and the configure file is like this: </p>
  
  <pre><code>modules:
    http_post_2xx:
      prober: http
      timeout: 5s
      http:
        method: POST
        headers:
          Content-Type: application/json
        body: '{text: "hi"}'
  </code></pre>
  
  <p>I configure the prometheus.yml in this way:</p>
  
  <pre><code>  - job_name: 'blackbox'
      metrics_path: /probe
      params:
          module: [http_post_2xx]
      static_configs:
          - targets:
              - 10.0.100.130:2001 
              - 10.0.100.130:2002 # The IP address I want to monitor
      relabel_configs:
        - source_labels: [__address__]
          target_label: __param_target
        - source_labels: [__param_target]
          target_label: instance
        - target_label: __address__
          replacement: 10.0.100.130:9115 # Turn on this port for sending metrics
  </code></pre>
  
  <p>The dashboard I apply is <a href="https://grafana.com/dashboards/5345" rel="nofollow noreferrer">5345</a>, but I got something like this:
  <a href="https://i.stack.imgur.com/NJRtE.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I do not know why the HTTP Status Code is N/A or No, but the status from Postman is 200 OK. Is there anything wrong of my configuration? </p>