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
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
/var/lib/dynatrace/oneagent/agent/config. 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 behave similarly to automated, rule-based tags and environment variable-based tags.
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 file located in the following 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.
hostcustomproperties.conf files created should be encoded in UTF-8.