# Logstash input http plugin response back

**URL:** https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572
**Category:** Logstash
**Created:** [April 17, 2017, 11:48am UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572 "2017-04-17T11:48:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Arslan\_Khan](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Arslan\_Khan](https://discuss.elastic.co/u/Arslan_Khan)
#### Post date: [April 17, 2017, 11:48am UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572/1 "2017-04-17T11:48:08Z")

</div>

Hi all,  
I am working on logstash to use input http plugin to receive data. I am using CURL command to send data to it and every time it respond in 'ok' but there are errors in parsing data in logstash.

My question is that is it possible to send logstash stdout as a response to CURL command?.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2017, 11:19pm UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572/2 "2017-04-18T23:19:04Z")

</div>

What's your config look like\>?

---

<div class="post-metadata">

### Author: ![Arslan\_Khan](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Arslan\_Khan](https://discuss.elastic.co/u/Arslan_Khan)
#### Post date: [April 19, 2017, 10:34am UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572/3 "2017-04-19T10:34:32Z")

</div>

Hi Mark,

Below is my config file. The issue is whenever an input http receive a data it sends ACK abruptly but i want it send my stdout.

```
input {
  http{

    host => "127.0.0.1"
    port => 9090
    codec => "json"
}
}

filter {

 if [node_id] == "" {
     drop{}
 } else if [user_id] == "" {
  drop{}
 } else {

 mutate {
     add_field => { "request" => "%{headers[request_path]}"}
     add_field=>{"timeuid"=>"%{timestamp}"}
     remove_field => ["headers","@version","host"]

  }
}
}

output{
   stdout {
            codec => "json"
    }
  if [request] =="/v1/post/node"
{
     cassandra{
     hosts=>["127.0.0.1"]
     port => 9042
     protocol_version => 4
     keyspace => "test"
     table => "node"
     username => "cassandra"
     password => "cassandra"
     hints => {
            id => "int"
            at => "timestamp"
            resellerId => "int"
            errno => "int"
            duration => "float"
            ip => "inet"}
    ignore_bad_values => true
    retry_policy => { "type" => "default" }
    flush_size => 500
    idle_flush_time => 1
}
}
```

---

<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: [April 19, 2017, 10:55am UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572/4 "2017-04-19T10:55:10Z")

</div>

> My question is that is it possible to send logstash stdout as a response to CURL command?.

No.

---

<div class="post-metadata">

### Author: ![Arslan\_Khan](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Arslan\_Khan](https://discuss.elastic.co/u/Arslan_Khan)
#### Post date: [April 19, 2017, 11:13am UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572/5 "2017-04-19T11:13:16Z")

</div>

Thanks

---

<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 17, 2017, 11:26am UTC](https://discuss.elastic.co/t/logstash-input-http-plugin-response-back/82572/6 "2017-05-17T11:26:10Z")

</div>

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