# Logstash pipeline to pipeline - outputs too many documents

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-to-pipeline-outputs-too-many-documents/234365>\
**Category:** Logstash\
**Created:** [May 26, 2020, 3:07pm UTC](https://discuss.elastic.co/t/logstash-pipeline-to-pipeline-outputs-too-many-documents/234365 "2020-05-26T15:07:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shai\_Lers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shai_lers/32/47551_2.png) [@Shai\_Lers](https://discuss.elastic.co/u/Shai_Lers)\
**Post date:** [May 26, 2020, 3:07pm UTC](https://discuss.elastic.co/t/logstash-pipeline-to-pipeline-outputs-too-many-documents/234365/1 "2020-05-26T15:07:03Z")

</div>

**Hi, i am using filebeat in order to write to a pipeline:**

```auto
input {
    beats {
        port => "5050"
    }
}

output {

    if [message] =~ /value/ {

        pipeline { send_to => [reciving_pipeline]
         }
}

}

```

**and this pipeline is writing to elasticsearch:**

```auto
input {

    pipeline { address => reciving_pipeline }
}

filter {

    json {
        source => "message"
    }

}

output {

        elasticsearch {
            hosts => ["elasticsearch:9200"]
            index => "reciving_pipeline_index-%{+YYYY.MM}"
        }

}

```

and from some reason, i get more and more documents inserted into the elasticsearch although the log file im testing has only 2. in the last try the number was like 728 documents.

anyone knows something about this?

---

<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:** [June 23, 2020, 3:07pm UTC](https://discuss.elastic.co/t/logstash-pipeline-to-pipeline-outputs-too-many-documents/234365/2 "2020-06-23T15:07:18Z")

</div>

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