Set custom host names in dynamic environments

If you're monitoring a relatively static environment in which host instances are stable, you can simply type in a custom host name via Host settings (from any Host page, click Settings to access the Host name field).

To programmatically control how OneAgent reports host names, or to monitor particularly dynamic deployments that include frequently changing host instances and names (for example, AWS or MS Azure), we recommend that you use a configuration file to override the auto-detected host names.

Add a host name configuration file

To override an automatically detected host name, create a simple hostname.conf configuration file on the monitored host. On Windows, save the file to C:\ProgramData\dynatrace\oneagent\agent\config (note that Unicode encoding is not available on Windows). On Linux, save the file to /var/lib/dynatrace/oneagent/agent/config. See the example below:

My App Server

After you restart the Dynatrace OneAgent service, Dynatrace will pick up the new host name and apply it to the host. Note that the host name typed on the Host settings page, takes precedence over the name stored in the hostname.conf configuration file.