# Logstash drop data

**URL:** <https://discuss.elastic.co/t/logstash-drop-data/161123>\
**Category:** Logstash\
**Created:** [December 17, 2018, 10:47am UTC](https://discuss.elastic.co/t/logstash-drop-data/161123 "2018-12-17T10:47:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmukhtar](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jmukhtar](https://discuss.elastic.co/u/jmukhtar)\
**Post date:** [December 17, 2018, 10:47am UTC](https://discuss.elastic.co/t/logstash-drop-data/161123/1 "2018-12-17T10:47:21Z")

</div>

Hi Guys

I am having an issue with the logstash drop filter.

I am getting 2 types of data via filebeat from couple of servers, and i want to drop anything that is with json type.

In filebeat, I have following config

```
- input_type: log
  paths:
- "/var/log/abc/tomcat/development/support/support.json"
  document_type: "webapp"
  json.keys_under_root: true
  fields:
environment: "development"
webapp: "support"
type: "json"

```

And below is what i have in logstash

```
filter {

                if [type] == "json" {
                        drop { }
               }

               else if [fields.type] == "json" {
                        drop { }
               }
}

```

I can't change the servers to not stop sending json.

Any help would be great.

Thanks,  
Junaid

---

<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:** [January 14, 2019, 10:47am UTC](https://discuss.elastic.co/t/logstash-drop-data/161123/2 "2019-01-14T10:47:30Z")

</div>

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