# Use global field

**URL:** <https://discuss.elastic.co/t/use-global-field/295420>\
**Category:** Elasticsearch\
**Created:** [January 26, 2022, 6:40am UTC](https://discuss.elastic.co/t/use-global-field/295420 "2022-01-26T06:40:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratseba](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@ratseba](https://discuss.elastic.co/u/ratseba)\
**Post date:** [January 26, 2022, 6:40am UTC](https://discuss.elastic.co/t/use-global-field/295420/1 "2022-01-26T06:40:07Z")

</div>

Hi,  
I have several environments with beats and logstash who write to one Elasticsearch. Each of them have properties like: customer, environmnet type ( production, test) and type (depending on what they are for). In each logstash configuration file (pipeline) i need to set add\_field which these three parametrs. Can i do it globall ? Not in every filter ? Maybe is a way to set it globally (set that customer=XYZ etc and only use it later). I know about environment fields (export and use it) but maybe is another way for example set this field in specific file ?

---

<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 23, 2022, 6:40am UTC](https://discuss.elastic.co/t/use-global-field/295420/2 "2022-02-23T06:40:27Z")

</div>

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