I was following this doc page 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.
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?
Solved! Go to Solution.
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