The infrastructure agent can be configured in a variety of ways. The default method is to edit the configuration variables in the
A configuration file template is available in Infrastructure config file template. You can also override the config file by setting environment variables, or use config management tools, such as Ansible or Puppet.
To configure on-host integrations that work with the infrastructure agent, see a specific integration's documentation.
The default method to configure the infrastructure agent is the
newrelic-infra.yml config file. You can override the config file by setting environment variables, which is ideal for containerized environments.
Environment variables override the config file. The config file overrides the agent defaults.
Here are detailed descriptions of each configuration method:
For a better understanding of configuration settings, see Infrastructure configuration settings, which contains a detailed explanation of each variable.
newrelic-infra.yml, you must conform to the YAML format and adhere to the following rules:
- Do not modify the casing of the configuration options: YAML keys are case sensitive.
- Respect the indentation levels. All indentations are in similar increments, typically of two space characters. Data in the same stanza of the file must use the same level of indentation. Indent any sub-stanzas by an additional two spaces (see examples in Custom attributes and Network interface filters).
Always restart the agent or your web server after changing settings.
To dynamically create your configuration file and manage the infrastructure agent with configuration management tools, see the documentation for:
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.