# Unable to decode response from prometheus endpoint

**URL:** <https://discuss.elastic.co/t/unable-to-decode-response-from-prometheus-endpoint/243949>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 6, 2020, 2:50am UTC](https://discuss.elastic.co/t/unable-to-decode-response-from-prometheus-endpoint/243949 "2020-08-06T02:50:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaikunwar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaikunwar/32/72788_2.png) [@jaikunwar](https://discuss.elastic.co/u/jaikunwar)\
**Post date:** [August 6, 2020, 2:50am UTC](https://discuss.elastic.co/t/unable-to-decode-response-from-prometheus-endpoint/243949/1 "2020-08-06T02:50:12Z")

</div>

I am using metricbeat but getting error like:

Error fetching data prometheus.collector: unable to decode response from prometheus endpoint: error making http request Get [http://testserver:9104/metrics:](http://testserver:9104/metrics:) net:/http: request cancelled (Client.Timeout exceeded while awaiting headers)

It looks like the above url ends with ":" which is causing the issue.

My config details are below:  
module: Prometheus  
period:20s  
hosts:['testserver:9104']  
metric\_path: /metrics

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 3, 2020, 4:50am UTC](https://discuss.elastic.co/t/unable-to-decode-response-from-prometheus-endpoint/243949/2 "2020-09-03T04:50:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
