# Get http site body content with metricbeat or heartbeat

**URL:** <https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 18, 2018, 11:54am UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537 "2018-07-18T11:54:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aert](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@Aert](https://discuss.elastic.co/u/Aert)\
**Post date:** [July 18, 2018, 11:54am UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537/1 "2018-07-18T11:54:50Z")

</div>

Hello,

Sorry for the newbie request... I managed to deploy & configure metribeat & heartbeat to monitor a few things, and make some graphs.  
Unfortunately did not manage to get the body content of a simple webpage with the folowing http.yml configuration in metricbeat.  
Could you please tell how i can do this ?

- module: http  
metricsets: ["json"]  
period: 10s  
hosts: ["localhost:8182"]  
namespace: "json\_namespace"  
path: "/TDV/isAlive"  
body: ""  
method: "GET"  
request.enabled: true  
response.enabled: true

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [July 18, 2018, 10:47pm UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537/2 "2018-07-18T22:47:13Z")

</div>

Is the endpoint you're trying to reach JSON?

Are there any errors in the metricbeat logs?

---

<div class="post-metadata">

**Author:** ![Aert](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@Aert](https://discuss.elastic.co/u/Aert)\
**Post date:** [July 19, 2018, 8:33am UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537/3 "2018-07-19T08:33:59Z")

</div>

No, the endpoint is not JSON. The logs show an error with the namespace (seems legit).  
Is it mandatory ?

I also tried with the Metricbeat http module : metricsets: ["server"]  
And also with Heartbeat and did not succeed

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [July 19, 2018, 4:08pm UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537/4 "2018-07-19T16:08:00Z")

</div>

Hmmm, so the overall goal here is to fetch a webpage and get its contents.

This sounds a lot like heartbeat, but you also want the HTTP body, which it doesn't store. Is that a correct understanding?

May I ask what you want the body for?

---

<div class="post-metadata">

**Author:** ![Aert](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@Aert](https://discuss.elastic.co/u/Aert)\
**Post date:** [July 19, 2018, 4:29pm UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537/5 "2018-07-19T16:29:42Z")

</div>

You're absolutely right 🙂  
I'd like to get the body of a very light life-test web page for monitoring and build watcher alerts.

Do you think that's possible ?  
One desperate solution may be to get the body content with a wget and send the output to a log file which would be send to kibana with Filebeat, but that seems really... desperate and awfull.

---

<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:** [August 16, 2018, 4:29pm UTC](https://discuss.elastic.co/t/get-http-site-body-content-with-metricbeat-or-heartbeat/140537/6 "2018-08-16T16:29:48Z")

</div>

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