# Logstash environment plugin doesn't seem to work

**URL:** <https://discuss.elastic.co/t/logstash-environment-plugin-doesnt-seem-to-work/38872>\
**Category:** Logstash\
**Created:** [January 11, 2016, 11:51am UTC](https://discuss.elastic.co/t/logstash-environment-plugin-doesnt-seem-to-work/38872 "2016-01-11T11:51:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![gaurav1424](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gaurav1424](https://discuss.elastic.co/u/gaurav1424)\
**Post date:** [February 17, 2016, 3:44pm UTC](https://discuss.elastic.co/t/logstash-environment-plugin-doesnt-seem-to-work/38872/7 "2016-02-17T15:44:13Z")

</div>

> [@gaurav1424](#):
>
> here is example:
> 
> My input file : filter { environment { add\_metadata\_from\_env =\> {"region" =\> "REGION\_ENV"} add\_field =\> ["my\_env", "%{[@metadata][region]}"] }}
> 
> bash-3.2$ echo $REGION\_ENVamerbash-3.2$
> 
> My output : { "message" =\> "Hello world\r", "@version" =\> "1", "@timestamp" =\> "2016-02-17T00:04:13.540Z", "host" =\> "0:0:0:0:0:0:0:1", "port" =\> 61248, "my\_env" =\> "%{[@metadata][region]}"}
> 
> Anything I am missing here ?

Ok. Here you go : [Environment filter is not working](https://discuss.elastic.co/t/environment-filter-is-not-working/42040)

---

_[View the full topic](https://discuss.elastic.co/t/logstash-environment-plugin-doesnt-seem-to-work/38872)._
