# Set order of filebeat inputs

**URL:** https://discuss.elastic.co/t/set-order-of-filebeat-inputs/267157
**Category:** Beats
**Tags:** filebeat
**Created:** [March 13, 2021, 6:04pm UTC](https://discuss.elastic.co/t/set-order-of-filebeat-inputs/267157 "2021-03-13T18:04:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SKiD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skid/32/56535_2.png) [@SKiD](https://discuss.elastic.co/u/SKiD)
#### Post date: [March 13, 2021, 6:04pm UTC](https://discuss.elastic.co/t/set-order-of-filebeat-inputs/267157/1 "2021-03-13T18:04:30Z")

</div>

Hey,

I want to ship lines from Filebeat to Logstash in a specific input order. The reason I want to do that is that the documents of the second input are basing on the documents of the second input. This means I update those documents I have shipped at first.

I was thinking, that I could reduce the harvester to 1 because then Filebeat would read first the files of the first input before it starts to read the files of the second input, but I can't figure out, how Filebeat determines the order of inputs. Every time I start Filebeat the wrong input will be processed and Logstash throws exceptions because the documents do not exist (yet).

Is there a way to set the order somehow?  
Or maybe any workaround?

Thank you and best regards,  
Danny.

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [March 15, 2021, 6:26pm UTC](https://discuss.elastic.co/t/set-order-of-filebeat-inputs/267157/2 "2021-03-15T18:26:09Z")

</div>

Filebeat does not offer any guarantees with ordering of the inputs. Perhaps you could look into using [Elasticsearch's `enrich` processor](https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest-enriching-data.html)?

---

<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 12, 2021, 8:27pm UTC](https://discuss.elastic.co/t/set-order-of-filebeat-inputs/267157/3 "2021-04-12T20:27:09Z")

</div>

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