# Distributed Pipeline - Can the send\_to address be resolved from a variable?

**URL:** <https://discuss.elastic.co/t/distributed-pipeline-can-the-send-to-address-be-resolved-from-a-variable/237204>\
**Category:** Logstash\
**Created:** [June 16, 2020, 2:04am UTC](https://discuss.elastic.co/t/distributed-pipeline-can-the-send-to-address-be-resolved-from-a-variable/237204 "2020-06-16T02:04:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott\_stash](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@scott\_stash](https://discuss.elastic.co/u/scott_stash)\
**Post date:** [June 16, 2020, 2:04am UTC](https://discuss.elastic.co/t/distributed-pipeline-can-the-send-to-address-be-resolved-from-a-variable/237204/1 "2020-06-16T02:04:24Z")

</div>

I have a working setup, where events come in from a single filebeat node, hit the log stash main pipeline which sends the event to one of 20 different pipelines.

To do this there is an ugly if statement that does 20 string comparisons and sends the event off..

I'd rather replace that with something like:

`pipeline { send_to => "%pipeline_name" } }`

When I try this log stash logs `"$pipeline_name"` is not available.. so it appears its not translating the variable.. is this possible?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 16, 2020, 2:33am UTC](https://discuss.elastic.co/t/distributed-pipeline-can-the-send-to-address-be-resolved-from-a-variable/237204/2 "2020-06-16T02:33:44Z")

</div>

Pipelines are configured and connected during initialization, so they cannot use sprintf references to events like %{pipeline\_name}. Are you trying to do that or to use an environment variable? (I doubt that works either, to be honest.)

---

<div class="post-metadata">

**Author:** ![scott\_stash](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@scott\_stash](https://discuss.elastic.co/u/scott_stash)\
**Post date:** [June 16, 2020, 8:33am UTC](https://discuss.elastic.co/t/distributed-pipeline-can-the-send-to-address-be-resolved-from-a-variable/237204/3 "2020-06-16T08:33:25Z")

</div>

Thanks, that makes a lot of sense. I was just trying to use logstash variables.. my Filebeat tags the pipeline name on each event so it can get sent to where it needs to go.

---

<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:** [July 14, 2020, 8:33am UTC](https://discuss.elastic.co/t/distributed-pipeline-can-the-send-to-address-be-resolved-from-a-variable/237204/4 "2020-07-14T08:33:25Z")

</div>

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