# Do tags created via hostautotag.conf always prepend \[Environment\] to the tag?

**URL:** <https://community.dynatrace.com/t/do-tags-created-via-hostautotag-conf-always-prepend-environment-to-the-tag/12285>\
**Category:** Open Q&A\
**Tags:** tagging\
**Created:** [June 1, 2018, 7:22pm UTC](https://community.dynatrace.com/t/do-tags-created-via-hostautotag-conf-always-prepend-environment-to-the-tag/12285 "2018-06-01T19:22:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom\_lagona1](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@tom\_lagona1](https://community.dynatrace.com/u/tom_lagona1)\
**Post date:** [June 1, 2018, 7:22pm UTC](https://community.dynatrace.com/t/do-tags-created-via-hostautotag-conf-always-prepend-environment-to-the-tag/12285/1 "2018-06-01T19:22:52Z")

</div>

I was following [this doc page](https://www.dynatrace.com/support/help/infrastructure/hosts/how-do-i-define-tags-in-a-host-based-configuration-file/) to create very high level tagging during agent install. Looking at the example, you can modify /var/lib/dynatrace/oneagent/agent/config/hostautotag.conf and the tags show up ‘normally.’

When I followed this process myself I see the tag turns out differently than the screenshot from the doc page.

Example:

Edit /var/lib/dynatrace/oneagent/agent/config/hostautotag.conf, file reads IST=1, saved file.

Shows “[Environment]IST:1” in Dynatrace

Is there a way to remove the [Environment] part?

Related question, the above file is owned by root (even when I used the GROUP and USER option during agent install). This is a minor pain point in my environment as it requires I open an internal ticket and wait a few days for any changes to be made to the file. If we were to change ownership of the file would there be any issue with the tags working?

---

<div class="post-metadata">

**Author:** ![nj\_njoku](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nj_njoku/32/13710_2.png) [@nj\_njoku](https://community.dynatrace.com/u/nj_njoku)\
**Post date:** [June 1, 2018, 10:32pm UTC](https://community.dynatrace.com/t/do-tags-created-via-hostautotag-conf-always-prepend-environment-to-the-tag/12285/2 "2018-06-01T22:32:07Z")

</div>

Hi Tom,

I just tested this on both a Linux and a Windows host and it appended the Environment prefix every time so I do not believe this can be changed. I think it is by design to differentiate what was tagged manually or using auto-tagging rules in the UI with what was tagged using the **hostautotag.conf** file or an environment variable. If you hover your mouse on any of these tags you will see it says “ **applied by environment** ”. Tags created using this file cannot be deleted from the UI.

2. I just changed the ownership of the hostautotag.conf from **root** to **dtuser** and the tags are still there. I will suggest including this in your installation steps if it is mandatory that this be owned by your user i.e. create a script that runs the oneagent installer and then changes ownership of the files/directories that you want to be owned by your USER.

Hope This Helps

NJ
