# How to generate only events in output

**URL:** https://discuss.elastic.co/t/how-to-generate-only-events-in-output/125732
**Category:** Logstash
**Created:** [March 27, 2018, 10:50am UTC](https://discuss.elastic.co/t/how-to-generate-only-events-in-output/125732 "2018-03-27T10:50:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://discuss.elastic.co/u/Dan)
#### Post date: [March 27, 2018, 10:50am UTC](https://discuss.elastic.co/t/how-to-generate-only-events-in-output/125732/1 "2018-03-27T10:50:49Z")

</div>

I am using HTTP as input and elastic search as output.

My requirement is to generate only events in output and we don't need to get data in output.

**How can I achieve this?**

**Below is my conf file**

input {  
http\_poller {  
urls =\> {  
soap\_request =\> {  
method =\> post  
url =\> "[https://xyz.com](https://xyz.com)"  
headers =\> {  
"Content-Type" =\> "text/xml; charset=utf-8"  
"Action" =\> "[http://xml123.com](http://xml123.com)"  
"Authorization" =\> "Basic xxxxxxxx"  
}  
body =\> ''  
}  
}  
request\_timeout =\> 60  
interval =\> 60  
codec =\> "plain"  
}  
}  
filter{

}

output {  
stdout { codec =\> rubydebug }  
elasticsearch {  
action =\> "index"  
hosts =\> "127.0.0.1:9200"   
index =\> "header-test"  
workers =\> 1  
}  
}

I am getting JSON response from HTTP input as below.  
{

key1 : Value1  
key2: Value2  
key3 : Value3

}

I Just want to get key1,key2,key3 as output, not required data.

Please help me...  
Thanks in Advance......

---

<div class="post-metadata">

### Author: ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)
#### Post date: [March 27, 2018, 1:23pm UTC](https://discuss.elastic.co/t/how-to-generate-only-events-in-output/125732/2 "2018-03-27T13:23:34Z")

</div>

Not quite sure what you are asking, do you have an example data set that was ingested? If there are fields being created that you do not want, in your filter section, using nearly any filter, you can use the `remove_field` function.

```
filter {
  mutate {
    remove_field => "fieldname"
  }
}
```

---

<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: [April 24, 2018, 1:24pm UTC](https://discuss.elastic.co/t/how-to-generate-only-events-in-output/125732/3 "2018-04-24T13:24:01Z")

</div>

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