# Removing unwanted data in Filebeats / Logstash

**URL:** <https://discuss.elastic.co/t/removing-unwanted-data-in-filebeats-logstash/267774>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [March 19, 2021, 9:29am UTC](https://discuss.elastic.co/t/removing-unwanted-data-in-filebeats-logstash/267774 "2021-03-19T09:29:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![h\_q](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/h_q/32/85793_2.png) [@h\_q](https://discuss.elastic.co/u/h_q)\
**Post date:** [March 19, 2021, 9:29am UTC](https://discuss.elastic.co/t/removing-unwanted-data-in-filebeats-logstash/267774/1 "2021-03-19T09:29:13Z")

</div>

I started ingesting Kubernetes logs into ElasticSearch, using the [Filebeat Input Container](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-container.html):  
`Filebeat -> Logstash -> ElasticSearch`

My `filebeat.yml` looks like this:

```auto
- type: container
  paths:
    - /var/lib/docker/containers/*/*.log
  fields:
    logs_type: "k8s"
  fields_under_root: true
  multiline.type: pattern
  multiline.pattern: '^[[:space:]]+(at|\.{3})[[:space:]]+\b|^Caused by:'
  multiline.negate: false
  multiline.match: after

processors:
- add_docker_metadata:
    host: "unix:///var/run/docker.sock"

output:
  logstash:
    enabled: True
    hosts:
      - logstash1:5043
      - logstash2:5043
    loadbalance: true

```

1. Is there a way to drop filed names that I don't believe I'll use, .e.g: `container.labels.org_label-schema_*`

2. What is the best way to drop messages from an entire container (e.g. no logs for `etcd` container)?

3. What is the best way to drop a specific message, form a specific container? For example, my `solr` container prints this useless message every second:

```auto
2021-01-01 00:00:00.000 INFO (qtp1107530534-20) [] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={} status=0 QTime=6

```

---

<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 16, 2021, 9:30am UTC](https://discuss.elastic.co/t/removing-unwanted-data-in-filebeats-logstash/267774/2 "2021-04-16T09:30:02Z")

</div>

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