# How to add variables like application code, context, environment in Filebeat configuration to distinguish the application logs of different applications

**URL:** <https://discuss.elastic.co/t/how-to-add-variables-like-application-code-context-environment-in-filebeat-configuration-to-distinguish-the-application-logs-of-different-applications/133789>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 30, 2018, 4:50am UTC](https://discuss.elastic.co/t/how-to-add-variables-like-application-code-context-environment-in-filebeat-configuration-to-distinguish-the-application-logs-of-different-applications/133789 "2018-05-30T04:50:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohit214721](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mohit214721](https://discuss.elastic.co/u/mohit214721)\
**Post date:** [May 30, 2018, 4:50am UTC](https://discuss.elastic.co/t/how-to-add-variables-like-application-code-context-environment-in-filebeat-configuration-to-distinguish-the-application-logs-of-different-applications/133789/1 "2018-05-30T04:50:12Z")

</div>

How to add variables like application code, context, environment in Filebeat configuration to distinguish the application logs of different applications.

Also, I want to make such configuration such that one application user must not able to access another application logs.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 30, 2018, 6:23am UTC](https://discuss.elastic.co/t/how-to-add-variables-like-application-code-context-environment-in-filebeat-configuration-to-distinguish-the-application-logs-of-different-applications/133789/2 "2018-05-30T06:23:32Z")

</div>

[https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general-options.html#configuration-general](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general-options.html#configuration-general) covers the first part.

For the second one you want X-Pack Security.

---

<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:** [June 27, 2018, 6:23am UTC](https://discuss.elastic.co/t/how-to-add-variables-like-application-code-context-environment-in-filebeat-configuration-to-distinguish-the-application-logs-of-different-applications/133789/3 "2018-06-27T06:23:48Z")

</div>

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