Some New Relic solutions require installation of an agent. The agent root directory is the main folder that holds the files for the agent. Typically, the agent root directory is the directory where the agent install process places the agent configuration file.
You may need to find the agent root directory for several reasons:
These strategies for finding the root directory are applicable if you followed the default install procedure. If you installed to a different directory, this information might not apply.
APM agents
The agent root directory depends on the agent you're using:
The Go agent root directory is the root directory of your app, where you imported the go-agent package when you installed the Go agent.
The Java agent root directory is called newrelic, which you created in your app server's root directory when you installed the Java agent.
The location of the .NET Core 2.0 agent root directory depends on your system:
The location of the .NET Framework agent root directory is C:\Program Files\New Relic\.NET Agent.
The Node.js agent root directory is the root directory of your app, where you copied newrelic.js when you installed the Node.js agent.
The location of the PHP agent root directory depends on how you installed the agent:
Installation method
Root directory location
With a package manager or tar archive
Use phpinfo() and look in the sections called Scan this dir for additional .ini files or Additional .ini files parsed for the location of the newrelic.ini file. This file will be in the agent root directory, which is called newrelic-php5.
Sugerencia
The PHP agent root directory is called newrelic-php5 for all supported PHP versions, including PHP 7.
You can install the Python agent anywhere on your host system and then supply a path to it through the NEW_RELIC_CONFIG_FILE environment variable or the newrelic.agent.initialize() API call.
The location of the Ruby agent root directory depends on how you installed the agent:
Installation method
Root directory location
With the newrelic_rpm gem
The Ruby agent root directory is in the root directory of your app in a directory called config.
Without the gem
Look in the NEW_RELIC_CONFIG_PATH environment variable for the path to the agent root directory.
If there isn't a path in that environment variable, check the following directories to find the one that contains the newrelic.yml file:
config
$HOME/.newrelic/
$HOME/
Mobile agent
The mobile agent root directory is the root directory of your app.
Infrastructure agent
The location of the infrastructure agent root directory depends on your system:
System
Root directory location
Windows
C:\Program Files\New Relic\newrelic-infra\
Linux, Docker, and Elastic Beanstalk
/etc
The location of the root directory for on-host integrations is /etc.
Because cloud integrations are not installed but are connected to our infrastructure monitoring through your cloud service provider, there is not a root directory specific to cloud integrations.