---
title: Unexpected host entity name change
source: https://docs.newrelic.com/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-infrastructure/host-name-changes
---

## Problem [#problem]

The agent is working but, unexpectedly, the entity name or host name in the UI or telemetry changes for the infrastructure agent.

## Solution [#solution]

Review the [hostname](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings/#hostname-variables) settings in the agent configuration.

Consider the following guidelines:

-   For cloud environments (AWS, Azure, GCP) ensure the instance id can be obtained via cloud metadata, missing permissions and other limitation might prevent the agent to obtain the required metadata.
-   If the host is not in the cloud neither has `display_name` defined in its configuration file, the agent will use the `hostname` as part of the entity name definition.
-   The agent tries to get the FQDN (full qualified domain name), which might not be properly configured in DNS or locally, or it can change dynamically in your environment. If 'dns_hostname_resolution' is set to false, it will use internal hostname resolution to obtain it from the OS.

## Cause [#cause]

The agent determines the value of `entityName` using the following list, ordered by priority:

-   AWS instance id
-   Azure instance id
-   GCP instance id
-   Alibaba instance id
-   Display name
-   Short hostname

It fallbacks to the next value in priority if not defined. If any of these values change, the `entityName` will dynamically change.
