# Cannot use Metricbeat Prometheus module to scrape Blackbox Exporter

**URL:** <https://discuss.elastic.co/t/cannot-use-metricbeat-prometheus-module-to-scrape-blackbox-exporter/379862>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 7, 2025, 10:36am UTC](https://discuss.elastic.co/t/cannot-use-metricbeat-prometheus-module-to-scrape-blackbox-exporter/379862 "2025-07-07T10:36:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Yaari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amit_yaari/32/144021_2.png) [@Amit\_Yaari](https://discuss.elastic.co/u/Amit_Yaari)\
**Post date:** [July 7, 2025, 10:36am UTC](https://discuss.elastic.co/t/cannot-use-metricbeat-prometheus-module-to-scrape-blackbox-exporter/379862/1 "2025-07-07T10:36:02Z")

</div>

I am trying to use Metricbeat’s Prometheus module to collect results from the Blackbox Exporter (`prom/blackbox-exporter`), which probes services using the `/probe` endpoint.

I want to probe internal service health endpoints (e.g., `/health`) using Blackbox and then collect the resulting metrics (`probe_success`, `probe_duration_seconds`, etc.) using Metricbeat, and send them to Elasticsearch.

In Prometheus, we added the following scrape config:

scrape\_configs:

- job\_name: blackbox  
metrics\_path: /probe  
params:  
module: [http\_2xx]  
static\_configs:
  - targets:
    - [http://service-a.namespace.svc:8080/health](http://service-a.namespace.svc:8080/health)
    - [http://service-b.namespace.svc:8080/health](http://service-b.namespace.svc:8080/health)  
relabel\_configs:

  - source\_labels: [**address**]  
target\_label: \_\_param\_target
  - source\_labels: [\_\_param\_target]  
target\_label: instance
  - target\_label: **address**  
replacement: blackbox-exporter.namespace.svc:9115

This setup worked perfectly.  
But now I want to scrape the metrics using Metricbeat instead of Prometheus.

I tried to configure Metricbeat’s `prometheus` module like this:

metricbeat.modules:

- module: prometheus  
metricsets: ["collector"]  
period: 30s  
hosts:
  - "[http://blackbox-exporter.namespace.svc:9115](http://blackbox-exporter.namespace.svc:9115)"  
metrics\_path: /probe  
params:  
module: ["http\_2xx"]  
target: ["[http://service-a.namespace.svc:8080/health](http://service-a.namespace.svc:8080/health)"]

Actual behavior: Metricbeat either:

- Ignores the `params:` field entirely (query string not included in the request)
- Fails with errors or timeouts (as it tries to scrape `/probe` without required `target` param)

Any suggestions?
