# Bug in http\_poller: Environment variables don't always evaluate with http\_poller

**URL:** <https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070>\
**Category:** Logstash\
**Created:** [June 16, 2016, 10:58pm UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070 "2016-06-16T22:58:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamthealex](https://avatars.discourse-cdn.com/v4/letter/i/e9c0ed/32.png) [@iamthealex](https://discuss.elastic.co/u/iamthealex)\
**Post date:** [June 16, 2016, 10:58pm UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070/1 "2016-06-16T22:58:39Z")

</div>

You can see the full details here:[http://pastebin.com/3sLsemjU](http://pastebin.com/3sLsemjU)  
but the basic problem is that env substitution is not happening on all the fields.  
Specifically, this env substitution doesn't work:

I need this form so that I can specify request headers.

input {  
http\_poller {  
urls =\> {  
test2 =\> {  
method =\> get  
url =\> "http://${ADDRESS}:8080/Fred.txt"  
}  
}  
interval =\> 60  
}  
}

This substitution does work, but this form of using the http\_poller doesn't seem to allow headers to be specified.  
input {

http\_poller {  
urls =\> { "test2" =\> "http://${ADDRESS}:8080/Fred.txt" }  
interval =\> 30  
}

}

---

<div class="post-metadata">

**Author:** ![emile](https://avatars.discourse-cdn.com/v4/letter/e/58956e/32.png) [@emile](https://discuss.elastic.co/u/emile)\
**Post date:** [December 8, 2016, 7:37pm UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070/2 "2016-12-08T19:37:04Z")

</div>

any development on this? I have the exact same problem here and cant find anything else anywhere on the cybernets.

---

<div class="post-metadata">

**Author:** ![emile](https://avatars.discourse-cdn.com/v4/letter/e/58956e/32.png) [@emile](https://discuss.elastic.co/u/emile)\
**Post date:** [December 10, 2016, 10:08pm UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070/3 "2016-12-10T22:08:28Z")

</div>

I filed a pull request concerning this. Hopefully it will be considered. [https://github.com/elastic/logstash/pull/6392](https://github.com/elastic/logstash/pull/6392)

---

<div class="post-metadata">

**Author:** ![suyograo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suyograo/32/44898_2.png) [@suyograo](https://discuss.elastic.co/u/suyograo)\
**Post date:** [February 21, 2017, 10:18pm UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070/4 "2017-02-21T22:18:45Z")

</div>

Thanks to @emile for the patch. It has been merged and will be available in 5.4.0 of Logstash

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [March 1, 2017, 1:49pm UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070/5 "2017-03-01T13:49:42Z")

</div>

Hi @suyograo,

Why not in the 5.3.0 ?

---

<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 6, 2017, 4:28am UTC](https://discuss.elastic.co/t/bug-in-http-poller-environment-variables-dont-always-evaluate-with-http-poller/53070/6 "2017-07-06T04:28:11Z")

</div>


