HTTP input does not return content in Elasticsearch Alerting


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": [
            "date": [
              "Thu, 20 Apr 2017 05:00:39 GMT"
            "content-length": [
            "x-consul-index": [
            "content-type": [
            "x-consul-knownleader": [
          "_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?

(Alexander Reelsen) #2


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?



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.

(system) #4

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