# HTTP input does not return content in Elasticsearch Alerting

**URL:** <https://discuss.elastic.co/t/http-input-does-not-return-content-in-elasticsearch-alerting/82978>\
**Category:** Elasticsearch\
**Created:** [April 20, 2017, 5:08am UTC](https://discuss.elastic.co/t/http-input-does-not-return-content-in-elasticsearch-alerting/82978 "2017-04-20T05:08:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anishm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anishm/32/28796_2.png) [@anishm](https://discuss.elastic.co/u/anishm)\
**Post date:** [April 20, 2017, 5:08am UTC](https://discuss.elastic.co/t/http-input-does-not-return-content-in-elasticsearch-alerting/82978/1 "2017-04-20T05:08:45Z")

</div>

I am using X-Pack with Elasticsearch 5.2.2.  
The following is my HTTP input definition:

```
"input": {
    "http": {
      "request": {
        "host": "localhost",
        "port": 8500,
        "scheme": "http",
        "method": "get",
        "path": "/v1/catalog/service/elasticsearch"
      }
    }
  }

```

The payload that I get after performing `/_execute` on the watcher:

```
{
          "_headers": {
            "x-consul-lastcontact": [
              "0"
            ],
            "date": [
              "Thu, 20 Apr 2017 05:00:39 GMT"
            ],
            "content-length": [
              "1159"
            ],
            "x-consul-index": [
              "20247249"
            ],
            "content-type": [
              "application/json"
            ],
            "x-consul-knownleader": [
              "true"
            ]
          },
          "_status_code": 200
        }}

```

It is observed that payload does not contain the response content, however the content-length appears to be `1159`. The request returns values when done with CURL on `all` elasticsearch nodes. In fact, I even tried the dns name of the host instead of `localhost`, and I get the same results. Is there something I am missing here?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 20, 2017, 8:44am UTC](https://discuss.elastic.co/t/http-input-does-not-return-content-in-elasticsearch-alerting/82978/2 "2017-04-20T08:44:02Z")

</div>

Hey,

wild guess: is the data being returned a JSON array? If so, this will be fixed in the next Elasticsearch release, namely 5.3.1.

If not, can you paste the response, so I can try and reproduce?

--Alex

---

<div class="post-metadata">

**Author:** ![anishm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anishm/32/28796_2.png) [@anishm](https://discuss.elastic.co/u/anishm)\
**Post date:** [April 20, 2017, 9:31am UTC](https://discuss.elastic.co/t/http-input-does-not-return-content-in-elasticsearch-alerting/82978/3 "2017-04-20T09:31:43Z")

</div>

Yep, the result is a JSON Array. Waiting for the next release. I haven't upgraded to 5.3.0 only becuase a data loss issue was reported when having multiple data paths. Anyway, looking forward to the fix.

---

<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:** [May 18, 2017, 9:37am UTC](https://discuss.elastic.co/t/http-input-does-not-return-content-in-elasticsearch-alerting/82978/4 "2017-05-18T09:37:39Z")

</div>

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