Within dynamic or large environments, manual host tagging can be impractical. For dynamic deployments that include frequently changing host instances and names (for example, AWS or MS Azure), you can use a dedicated configuration file to programmatically apply tags to your hosts. The same is true for additional host properties, i.e. metadata
hostcustomproperties.conf files created should be encoded in UTF-8.
Edit the host tag configuration file
During OneAgent installation, the installer creates a simple
hostautotag.conf configuration file on the monitored host. On Windows, the file is located in
%ProgramData%\dynatrace\oneagent\agent\config, and on Linux in
The file should contain a list of strings or key/value pairs that will be reported to the server with every file change. New lines or spaces are used to separate tag values. For example:
TestHost Gdansk role=fallback
The tags defined in this example result in the following host tagging:
Configuration file-based tags can't be removed manually from a host. They can only be removed through a
hostautotag.conf file change.
Once configured, the tags will be displayed at the top of the Properties and tags section of the host overview page.
Other options for automated tagging
You can also set up automated tagging of the hosts in your environment using:
Edit the host metadata configuration file
The process of configuring properties is very similar to the one for tags, but this time they are configured through the
hostcustomproperties.conf that you need to create and add to OneAgent configuration directories:
- all UNIX-like systems
Once configured, custom properties will be displayed at the bottom of the Properties and tags section of the host overview page. You can then set up automatic tagging rules to enable tagging of these properties.
If you remove a property from the
hostcustomproperties.conf file, allow 5-15 minutes for the property to clear from the Properties and tags section.
AppName=easyTravel Environment=Dev Organization=D1P Owneremail@example.com Support=https://www.dynatrace.com/support