You just upgraded to Infrastructure, and you’re excited to start seeing host data in your Infrastructure dashboard. But every time you try to start the New Relic Infrastructure Agent (NRIA), it runs for about 3 minutes then stops, and no data is showing up for your host in the dashboard. What’s going on?
One of the most common reasons for this is that the NRIA is picking up a hostname of
localhost. The NRIA does not work with hosts named
localhost. The backend will fail to process data and the agent itself will shut down after about 3 minutes.
One of the differences between Servers and Infrastructure is that Servers used the host’s hostname, while Infrastructure actually looks at the Fully Qualified Domain Name (FQDN) of a host, and uses that as the hostname. You can have a unique hostname set up, but if your FQDN is still set to
localhost, it will cause the NRIA to fail.
How can you check this on your host?
For Linux hosts:
From a terminal, enter
hostname -f and check the output.
For Windows hosts:
This information is located under System Properties -> Computer Name next to Domain, and under Active Directory Users and Computers.
OK, now what?
If you see that
localhost is the FQDN on the host you’re trying to install the NRIA on, change it to a unique name, then restart the NRIA. Another way around this is to set the
display_name: attribute in your
newrelic-infra.yml config file. This will override any FQDN that exists on the host and cause the NRIA to pick up on whatever
display_name: you’ve set instead. Note that you will have to restart the NRIA to get it to pick up on this change.
- Read more about setting the
- Read more about starting/stopping/restarting the NRIA here
Hopefully this helps get you up and running with New Relic Infrastructure!