# Logstach http\_pool input plugin

**URL:** <https://discuss.elastic.co/t/logstach-http-pool-input-plugin/92640>\
**Category:** Logstash\
**Created:** [July 11, 2017, 12:14pm UTC](https://discuss.elastic.co/t/logstach-http-pool-input-plugin/92640 "2017-07-11T12:14:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![huazhang](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@huazhang](https://discuss.elastic.co/u/huazhang)\
**Post date:** [July 11, 2017, 12:14pm UTC](https://discuss.elastic.co/t/logstach-http-pool-input-plugin/92640/1 "2017-07-11T12:14:41Z")

</div>

Dear experts,

logstash 5.4.1

i am trying use the logstach http\_pool plugin to get the http response. as i like use the following command to take the test. it working fine and get the json response.

curl -k -H "content-type: application/json" -XPOST '[https://100.112.20.30:8080/dM/rest/xxxx/sessions](https://100.112.20.30:8080/dM/rest/xxxx/sessions)' -d '{  
"username":"admin",  
"password":"admin",  
"scope":0  
}'

once i do the configuration in the conf file, it's never get the right response, i am not sure where is wrong:

input {  
http\_poller {  
urls =\> {  
Http183 =\> {  
# Supports all options supported by ruby's Manticore HTTP client  
method =\> "POST"  
url =\> "[https://100.112.20.30:8080/dM/rest/xxxx/sessions](https://100.112.20.30:8080/dM/rest/xxxx/sessions)'"  
header =\> {  
"Content-Type" =\> "Application/Json;charset=uft-8"  
"Cache-Control" =\> "no-cache"  
"connection" =\> "keep-alive"  
"Accept-Language" =\> "zh\_cn"  
}  
add\_field =\> {  
"username" =\> "admin"  
"password" =\> "admin"  
"scope" =\> 0  
}  
}  
}  
request\_timeout =\> 60  
# Supports "cron", "every", "at" and "in" schedules by rufus scheduler  
codec =\> "json"  
# A hash of request metadata info (timing, response headers, etc.) will be sent here  
metadata\_target =\> "http\_poller\_metadata"  
interval =\> 600  
ssl\_certificate\_validation =\> false  
}  
}

output {  
elasticsearch { hosts =\> ["127.0.0.1:9200"] index =\> "httpool-%{+YYYY}" }  
}

thanks for your help in advance, hope to get your good soluation.

thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 12, 2017, 7:51pm UTC](https://discuss.elastic.co/t/logstach-http-pool-input-plugin/92640/2 "2017-07-12T19:51:54Z")

</div>

You haven't configured Logstash to include anything in the body of the POST request (the JSON blob with username, password, and scope in your curl example). I don't think the http\_poller input supports that.

> "Content-Type" =\> "Application/Json;charset=uft-8"

"Content-Type" =\> "application/json;charset=utf-8"

---

<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 9, 2017, 7:52pm UTC](https://discuss.elastic.co/t/logstach-http-pool-input-plugin/92640/3 "2017-08-09T19:52:22Z")

</div>

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