# How to pass dynamic parameters in Logstash input

**URL:** <https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502>\
**Category:** Logstash\
**Created:** [January 29, 2018, 5:16pm UTC](https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502 "2018-01-29T17:16:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshb44](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rajeshb44](https://discuss.elastic.co/u/rajeshb44)\
**Post date:** [January 29, 2018, 5:16pm UTC](https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502/1 "2018-01-29T17:16:44Z")

</div>

How to pass dynamic parameters in Logstash input

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [January 29, 2018, 6:20pm UTC](https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502/2 "2018-01-29T18:20:33Z")

</div>

what do you mean pass dynamic parameters? Can you provide some sudo-code/explain what your trying to do?

---

<div class="post-metadata">

**Author:** ![rajeshb44](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rajeshb44](https://discuss.elastic.co/u/rajeshb44)\
**Post date:** [January 29, 2018, 7:23pm UTC](https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502/3 "2018-01-29T19:23:45Z")

</div>

Here is my input  
http\_poller {  
urls =\> {  
q1 =\> {  
method =\> get  
url =\> "[https://jsonplaceholder.typicode.com/posts/id=?"](https://jsonplaceholder.typicode.com/posts/id=?%22)  
headers =\> {  
Accept =\> "application/json"  
}  
}   
}  
id =\> "test1"  
tags =\> "firsttag"  
codec =\> "json"  
request\_timeout =\> 60  
metadata\_target =\> "http\_poller\_metadata"  
schedule =\> { cron =\> "\* \* \* \* \* UTC"}  
}

I want to pass the "id" value

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 29, 2018, 8:54pm UTC](https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502/4 "2018-01-29T20:54:02Z")

</div>

Pass from where? Your best bet is probably [https://www.elastic.co/guide/en/logstash/current/environment-variables.html](https://www.elastic.co/guide/en/logstash/current/environment-variables.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:** [February 26, 2018, 8:54pm UTC](https://discuss.elastic.co/t/how-to-pass-dynamic-parameters-in-logstash-input/117502/5 "2018-02-26T20:54:07Z")

</div>

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