Our custom installation process for the infrastructure agent for Windows allows you to tailor all aspects of the installation. You can place files and folders wherever you want on your filesystem.
This method gives you full control of the installation. You are responsible for placing the files in the correct folders, providing the correct configuration values, and ensuring the agent has all the right permissions.
Before installation, check the compatibility and requirements.
Install the agent
To install the agent:
Download the packaged agent file or use the following command that automatically fetches a specific version of the agent, its checksum and verifies it after download. Replace
$arch=amd64
with desired architecture (amd64, 386) and$v=1.27.4
with latest or specific version.bash$$v="1.27.4"; $arch="amd64"; $url="https://download.newrelic.com/infrastructure_agent/binaries/windows/$arch/newrelic-infra-$arch.$v.zip";@("$url", "$url.sum") | ForEach-Object { Invoke-WebRequest -Uri $_ -OutFile $_.Split('/')[-1] }; write-host 'Checksum:' $(If (Select-String -Path "$url.sum".Split('/')[-1] -Pattern (Get-FileHash $url.Split('/')[-1]).Hash -Quiet) {"Ok"} Else {"Fail"})Unpack the file.
Make sure the file unpacks with the following structure:
Optionally, you can:
- Change the location of the configuration file.
- Configure the plugin directory.
- Configure the agent directory.
- Configure the log file.
Install the service script
To proceed with the installation, you need to create the service. Check the file provided in the zip file for reference:
C:\Program Files\New Relic\newrelic-infra\installer.ps1
Configuration file
The infrastructure agent depends on a configuration file, usually named newrelic-infra.yml
, to configure the agent's behavior. This file is placed in the same folder with the agent.
You can create a new config file based on the config file template. For more information, see how to configure the agent.
Changing the config file's location
By default, the configuration file is located in C:\Program Files\New Relic\newrelic-infra\newrelic-infra.yml
.
To change the location of the configuration file:
Execute the command
regedit.exe
.Browse to the folder
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\newrelic-infra\ImagePath
.Retrieve the
ImagePath
key. If the agent binary is on the default path, look for the key atC:\Program Files\New Relic\newrelic-infra\newrelic-infra.exe
.Use the
-config
flag to add the new location of the configuration file to the key:C:\Program Files\New Relic\newrelic-infra\newrelic-infra.exe -config c:\config.yaml
Configure the plugin directory
The infrastructure agent allows you to install integrations that monitor and report data from popular services such as Kubernetes, AWS, MySQL, Redis, Kafka, etc. Each integration has its own configuration file, named integration-name-config.yml
by default.
This config file is placed in the predefined location C:\Program Files\New Relic\newrelic-infra\integrations.d
. On initialization, the agent loads the config file.
To overwrite the predefined location of the integration configuration file, use one of the following methods:
- Set the location in the
NRIA_PLUGIN_DIR
environment variable. - Set the custom path in the
newrelic-infra.yml
configuration file using theplugin_dir
field. - Pass it as a command line argument using
-plugin_dir
when you run thenewrelic-infra
binary.
Configure the agent directory
The agent requires its own defined directory to run the installed integrations, caching data (inventory), etc. The default location is C:\Program Files\New Relic\newrelic-infra\
.
The agent directory has the following structure and content:
LICENSE
: Text file containing the New Relic infrastructure agent license.custom-integrations
: Directory that stores the installed the custom integrations.newrelic-integrations
: Directory that stores the New Relic official integrations.
The agent also uses a different folder, app_data_dir
, to store data. By default it points to C:\ProgramData\New Relic\newrelic-infra\
.
To overwrite the predefined location of the agent directory, use one of the following methods:
- Set the location in the
NRIA_AGENT_DIR
environment variable. - Set the custom path in the
newrelic-infra.yml
configuration file using theagent_dir
field. - Pass it as a command line argument using
-agent_dir
when you run thenewrelic-infra
binary.
Configure the log file
By default the agent stores the log files in C:\Program Files\New Relic\newrelic-infra\newrelic-infra.log
.
To overwrite the predefined location of the log file, use one of the following methods:
- Set the location in the
NRIA_LOG_FILE
environment variable. - Set the custom path in the
newrelic-infra.yml
configuration file using thelog_file
field. - Pass it as a command line argument using
-log_file
when you run thenewrelic-infra
binary.
Did this doc help with your installation?
What's next?
You may also want to:
- Add custom attributes to annotate your infrastructure data.
- Connect your AWS account if your servers are hosted on Amazon EC2.
- Add other New Relic infrastructure integrations to collect data from external services.
- Manually start, stop, restart, or check the agent status.