# How to have a filebeat config send some prospectors to a pipeline and send some prospectors to no pipeline

**URL:** <https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 19, 2017, 6:13am UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492 "2017-10-19T06:13:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![frr255](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@frr255](https://discuss.elastic.co/u/frr255)\
**Post date:** [October 19, 2017, 6:13am UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492/1 "2017-10-19T06:13:28Z")

</div>

I have a Filebeat config containing multiple prospectors. I want some prospectors to be sent to a pipeline. This is easy.

However, I also want some prospectors _not_ to be sent to _any_ pipeline i.e. skip or avoid any pipelines. What's the easiest way to accomplish this?

Thanks!

---

<div class="post-metadata">

**Author:** ![Fei\_Yao](https://avatars.discourse-cdn.com/v4/letter/f/85e7bf/32.png) [@Fei\_Yao](https://discuss.elastic.co/u/Fei_Yao)\
**Post date:** [October 19, 2017, 3:55pm UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492/2 "2017-10-19T15:55:05Z")

</div>

Yes, I'm contemplating the same issue. The one I can think of is to have a pipeline defined doing nothing.

PUT \_ingest/pipeline/null  
{  
"description": "do-nothing",  
"processors": []  
}

Then, you can put multi-pipeline condition in place like:

```
- pipeline: null
  when.equals:
    fields.document_type: no-pipeline

```

Love to know other solutions as well.  
Thanks

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 23, 2017, 12:39pm UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492/3 "2017-10-23T12:39:08Z")

</div>

I think with 5.6 you can define the `pipeline` in the prospector as well. See [pipeline setting](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-filebeat-options.html#_pipeline).

---

<div class="post-metadata">

**Author:** ![frr255](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@frr255](https://discuss.elastic.co/u/frr255)\
**Post date:** [October 23, 2017, 10:36pm UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492/4 "2017-10-23T22:36:31Z")

</div>

That's great. Thanks!

This will also work.

```auto
filebeat:
  prospectors:
    - paths:
        - /PATH
      input_type: log
      fields:
        application: alpha
    - paths:
        - /PATH
      input_type: log
      fields:
        application: bravo
    - paths:
        - /PATH
      input_type: log
      fields:
        application: bravo

output.elasticsearch:
  hosts: ["URL"]
  pipelines:
    - pipeline: bravo
      when.equals:
        fields.application: "bravo"

```

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 24, 2017, 12:48pm UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492/5 "2017-10-24T12:48:26Z")

</div>

One can also make use of format strings:

```auto
filebeat.prospectors:
- input_type: log
  paths:
    - /PATH
  fields.application: alpha
- input_type: log
  paths:
    - /PATH
  fields.application: bravo

output.elasticsearch:
  hosts: ["URL"]
  pipeline: '%{[fields.application]}'

```

If `fields.application` is missing, `pipeline` will be empty -\> event is not send to any pipeline.

---

<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:** [November 21, 2017, 12:48pm UTC](https://discuss.elastic.co/t/how-to-have-a-filebeat-config-send-some-prospectors-to-a-pipeline-and-send-some-prospectors-to-no-pipeline/104492/6 "2017-11-21T12:48:29Z")

</div>

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