Incorrect host name reported

Problem

The agent is working, but the New Relic Infrastructure monitoring UI shows the wrong hostname.

Solution

To set the correct hostname, try the following steps:

  1. Edit the newrelic-infra.yml configuration file and add the override_hostname option, whose value is your expected hostname. For example:

    override_hostname: correct-host.domain.com
  2. Use your init system to restart the agent service:

    Restart the agent with SystemD

    Use SystemD commands with CentOS 7, Debian 8, RHEL 7, and Ubuntu 15.04 or higher:

    sudo systemctl restart newrelic-infra
    
    Restart the agent with System V

    Use System V commands with Debian 7:

    sudo /etc/init.d/newrelic-infra restart
    
    Restart the agent with Upstart

    Use Upstart commands with Amazon Linux, CentOS 6, RHEL 6, and Ubuntu 14.10 or lower:

    sudo initctl restart newrelic-infra
    
    Restart the agent in Windows
    net stop newrelic-infra
    net start newrelic-infra	

Cause

The New Relic infrastructure agent tries to resolve its fully qualified domain name against a domain name server, which may not be properly configured or not controlled by the same user as the New Relic infrastructure agent.

For more help

If you need more help, check out these support and learning resources:

If you need more help, check out these support and learning resources: