The infrastructure agent has a large set of configuration settings to fine-tune its behavior. Here we:
- List all the configuration options (in both their YAML and the environment variable names).
- Explain what the settings do and when to use them.
- Give the variable type and default value (if any).
- List the minimum required agent version as applicable.
중요
With secrets management, you can configure the agent on-host integrations with infrastructure to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management.
Still without a New Relic account? Sign up for free, forever.
Get started
You'll be able to configure our infrastructure agent to suit your environnment after you create a New Relic account (it's free, forever) and install the infrastructure agent.
The license_key
is the only required setting.
For an example of how all these variables can be used, see our sample configuration template in GitHub.
Environment variables
Many of the configuration options listed also admit using environment variables to set values, which take precendence over the YAML configuration.
중요
Often the infrastructure agent runs as a system service in the host, managed globally (e.g. systemd
for Linux, Windows Services, launchd
for macOS, etc). To apply configuration changes with environment variables in this setup,
these environment variables need to be set and made visible to the isolated context where the infrastructure agent service is running. The way of doing this is platform-dependent,
check the documentation for your platform's service manager to know how to add environment variables to system services.
Agent variables
Specifies the for your New Relic account. The agent uses this key to associate your server's metrics with your New Relic account. This setting is created as part of the standard installation process.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
Example:
license_key: 1234567890abcdefghijklmnopqrstuvwxyz1234
Specifies whether FedRAMP endpoints should be used.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
Specifies the number of logical processors available to the agent. Increasing this value helps to distribute the load between different cores.
If set to -1
, the agent will try to read the environment variable GOMAXPROCS
. If this variable is not set, the default value will be the total number of cores available in the host.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Since version 1.0.804 or higher, data sent from the agent is compressed by default. To disable payload compression, set payload_compression_level
to 0.
중요
Recommendation: Do not change this setting.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Number of times the agent will retry the request to check New Relic's platform availability at startup before throwing an error.
If set to a negative value, the agent will keep checking the connection until it succeeds.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
| 1.0.936 |
After a request has timed out, time the agent waits to retry a request to check New Relic's platform availability at startup.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
| 1.0.936 - 1.2.30 |
Time the agent waits until a request to check New Relic's platform availability at startup is considered timed out.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
| 1.0.936 |
Enables agent's self instrumentation.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
|
Enables Agent Retry for Log Transmission via the embedded fluentbit logging forwarder. Integer values are for the number of intended retries. Other possible values include False
to set the number of retries to infinite and no_retries
to turn off the retry functionality entirely.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Cloud variables
If the agent is running in a cloud instance, the agent will try to detect the cloud type and fetch basic metadata. Metrics can also be enriched with extended cloud metadata (including custom resource tags) when connecting the cloud provider account with New Relic.
Sets the number of times the agent retries to connect in case that cloud detection fails.
If cloud detection fails during the initialization of the agent, the agent will retry after waiting for CloudRetryBackOffSec
seconds.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
| 1.2.6 |
Sets the interval of time the agent will wait until discarding the metadata, in seconds. After this period metadata expires and the agent will fetch it again.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
| 1.2.6 |
Sets the interval of time the agent waits between cloud detection retries in case that cloud detection failed, in seconds.
If cloud detection fails during the initialization of the agent, it will retry for CloudMaxRetryCount
times.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
| 1.2.6 |
Specifies the cloud provider the agent is running in. When this is set up to a value different from the default, the agent will wait until it successfully acquires metadata (the instance ID) from the cloud provider before submitting any data to the backend.
With the default behavior, the agent will also try to detect the cloud provider and get the metadata but without blocking the agent.
Allowed values: ""
, "aws"
, "azure"
, "gcp"
, "alibaba"
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
| 1.40.1 |
Similar to DisableCloudMetadata
, but it disables the collection of cloud metadata only for the host alias plugin.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.0.220 |
Disables the collection of cloud metadata.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
Docker variables
Time, in seconds, before the cached containers metadata expires and the agent needs to fetch them again.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
| 1.0.801 |
Specifies the Docker client API version.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
|
File system variables
List of the types of file systems that the agent supports. This value needs to be a subset of the default list, and items that are not in the default list will be discarded.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| []string | Linux: Windows: | 1.0.220 |
List of storage devices to be ignored by the agent when gathering StorageSample
data.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| []string | 1.0.220 |
Example as a YAML attribute:
file_devices_ignored: - sda1 - sda2
Example as an environment variable:
FILE_DEVICES_IGNORED="sda1,sda2"
Hostname variables
Overrides the auto-generated hostname for reporting. This is useful when you have multiple hosts with the same name, since our infrastructure monitoring uses the hostname as the unique identifier for each host. Keep in mind this value is also used for the loopback address replacement on entity names.
For more information, see our documentation on how entity name resolution works.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | empty | 1.0.266 |
Example:
display_name: teslaOne
When true
, the full hostname is resolved by performing a reverse lookup of the host's address. Otherwise, it will be retrieved with the hostname command on Linux and from the TCP/IP parameters of the registry on Windows.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
When set, this is the value that will be reported for the full hostname; otherwise, the agent will perform the normal lookup behavior.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | 1.0.1015 |
Example:
my.custom-hostname.co.org
When set, this is the value that will be reported for the hostname; otherwise, the agent will perform the normal lookup behavior.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | 1.0.1015 |
Example:
my.custom-hostname
Installation variables
Directory where the agent stores files for cache, inventory, integrations, etc.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | Linux: Windows: | 1.0.2 |
Directory containing the configuration files of the integrations.
Each integration has its own configuration file, named by default <integration_name>-config.yml
, placed in a predefined location from which the agent loads on initialization.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | Linux: Windows: | 1.0.2 |
Specifies a custom path to install integrations, which allows to install them outside the agent_dir
. It has priority when the agent is looking for installed integrations.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | Empty | 1.0.2 |
Integrations variables
A list of environment variables that will be passed to all integrations. If an integration already has an existing configuration option with the same name, then the environment variable takes precedence.
Starting with infrastructure agent 1.24.1 passthrough_environment
supports regex for variable names.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| []string | Empty |
Example as a YAML attribute (inside the agent's configuration file, located by default in /etc/newrelic-infra.yml
):
passthrough_environment: - HOST - PORT - NRIA_.*
Example as an environment variable:
NRIA_PASSTHROUGH_ENVIRONMENT="HOST,PORT,NRIA_.*"
For Windows hosts:
PATHEXT
is an MS Windows environment variable. The function is to determine which file extensions mark files that are executable from every command line. This will resolve any errors reporting "... is not recognized as the name of a cmdlet, function, script file..." for common Flex integrations:
passthrough_environment: - PATHEXT
The agent enables loopback-address replacement on the entity name (and therefore key) automatically for version 3 of the integration protocol. If you are using version 2 of the protocol and want this behavior, enable the entityname_integrations_v2_update
option.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.2.15 |
By setting this configuration parameter to true
the agent will open an HTTP port (by default, 8001
) to receive data from the New Relic StatsD backend.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
By setting this value, the agent will start listening on the HTTPServerPort
to receive data from the New Relic StatsD backend.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
|
Sets the port for the http server to receive data from the New Relic StatsD backend.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Starts the process of deleting entities that haven't reported information during this interval.
Valid time units: s
(seconds), m
(minutes), and h
(hour).
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
|
Example:
1h
If you have a large number of processes on the host, or a large volume of data collected across your integrations, the agent queue can overrun. Increase the queue depth to prevent error messages resulting from full queues.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Defines the temp directory used as persisting storage for the integrations SDK synchronization.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
|
Use this setting if you're instrumenting the host from a source other than the infrastructure agent (for example, an OpenTelemetry Collector or Prometheus node exporter) and you want to keep using the infrastructure agent on-host integrations to monitor other infrastructure services. When enabled, the agent reports host inventory and integrations telemetry (event metrics and inventory) decorated with host metadata, but host metrics (CPU, memory, disk, network, processes) are disabled.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
Inventory variables
If the cached inventory becomes older than this value (for example, because the agent is offline), the agent automatically removes and recreates the delta store.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
|
When set to true, enables the inventory asynchronous processing allowing larger inventory payloads to be processed.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| bool |
|
The list of inventory paths ignored by the agent.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string[] | Empty list |
Example as a YAML attribute:
ignored_inventory: - files/config/stuff.bar - files/config/stuff.foo
Example as an environment variable:
NRIA_IGNORED_INVENTORY="files/config/stuff.bar,files/config/stuff.foo"
Linux variables
Location on Linux where the pid
file of the agent process is created. It is used at startup to ensure that no other instances of the agent are running.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
| 1.0.2 |
When true, formulation of the host virtual memory considers SReclaimable
as available memory; otherwise SReclaimable
will be considered part of the used memory.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
Logging variables
Log is a key-value map used to configure the infrastructure agent logger. Example as a YAML attribute:
log: file: '/var/log/newrelic-infra/newrelic-infra.log' level: debug forward: true stdout: false
Example as an environment variable:
NRIA_LOG_FILE='/var/log/newrelic-infra/newrelic-infra.log'NRIA_LOG_LEVEL='smart'NRIA_LOG_FORWARD='false'NRIA_LOG_STDOUT='true'
Defines the file path for the logs.
The default installation creates a log directory and it sets this filepath value in the file
configuration option for you. This log directory is different for each OS, as shown below.
Change this configuration option to customize the file path for the logs.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | See below* |
Default paths:
Linux: If not defined, it logs only in the standard output.
Windows, agent version 1.0.944 or higher:
C:\%ProgramData%\New Relic\newrelic-infra\newrelic-infra.logIf the directory can't be created:
C:\Program Files\New Relic\newrelic-infra\newrelic-infra.log
Defines the log level. Available values:
info
: Displays log messages of level error, warn and info.smart
: Enables the smart verbose mode. Smart verbose mode logs the lastsmart_level_entry_limit
debug messages when an error is logged.debug
: Displays log messages of level error, warn, info and debug.trace
: All log messages will be shown.중요
Trace level logging can generate a lot of data very quickly. Run the agent in trace mode only for as long as necessary to reproduce your issue, then set
level: info
and restart your agent to disable verbose logging. Alternatively, you can setlevel
:smart
, which will enable smart verbose mode.YML option name
Environment variable
Type
Default
Version
level
NRIA_LOG_LEVEL
string
Not set
Defines the log output format. Available values:
text
: Plain text output, one line per log entry.json
: JSON-formatted output, one line per log entry.YML option name
Environment variable
Type
Default
Version
format
NRIA_LOG_FORMAT
string
text
Enables forwarding the agent logs to our logs UI. To disable it, set this configuration option to false
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
By default all logs are displayed in both standard output and a log file. To disable logs in the standard output, set this configuration option to false
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
smart_level_entry_limit
refers to the number of previous debug messages that will be logged when an error is logged. For example, if the limit is set to 5
, debug logs will be cached in memory until an error is logged, at which point the previous 5 debug messages will also be logged.
중요
This configuration option is only used when level
is set to smart
(Smart Level enabled).
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
From version v1.28.0 on, you can use the built-in log rotation feature.
By default, log rotation is disabled. To enable it, you have to specify the maximum size of the log file with the max_size_mb
option.
When the infrastructure agent log file reaches that size, the current log file will be rotated into a new file.
log: level: info file: /var/log/newrelic-infra/newrelic-infra.log rotate: max_size_mb: 1000 # Required max_files: 5 # Optional compression_enabled: true # Optional file_pattern: YYYY-MM-DD_hh-mm-ss.log # Optional
max_size_mb
specifies the maximum size in MegaBytes of the infrastructure agent log file. When the file has reached this size, the current logs will be rotated into a new file.
When the max_size_mb
is 0
, built-in log rotation is disabled.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
max_files
defines how many archived log files will be keept. When this value is exceeded, older files will be removed.
When the max_files
is 0
the limit for the number of files is disabled.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
You can enable compression for the log files by setting compression_enabled
to true
. If compression is activated,
rotated files will have a gzip
format and will use less disk space.
중요
During the log rotation, if compression is enabled, the agent CPU usage might increase, especially when max_size_mb
value is greater than 1000
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
file_pattern
specifies the name format for the archived log files. By default, the new file name will use the following
name pattern: original-file_YYYY-MM-DD_hh-mm-ss.log
.
You can customize the file name pattern with the following timestamp fields:
YYYY
: YearMM
: MonthDD
: Dayhh
: Hourmm
: Minutess
: SecoundThe agent will automatically replace those timestamp fields with the time of the file rotation. For example:
log:level: infofile: /var/log/newrelic-infra/newrelic-infra.logrotate:max_size_mb: 1000file_pattern: rotated.YYYY-MM-DD_hh-mm-ss.logYML option name
Environment variable
Type
Default
Version
file_pattern
NRIA_LOG_ROTATE_FILE_PATTERN
string
file_YYYY-MM-DD_hh-mm-ss.file_extension
팁
Infrastructure agent version 1.28.0 introduced backward-compatible improvements in logging configuration. See our github documentation to understand the legacy settings and how to map them to the new structure.
Metrics variables
Custom attributes are key-value pairs (similar to tags in other tools) used to annotate the data from the infrastructure agent. You can use this metadata to filter your entities, group your results, and annotate your data. For example, you might indicate a machine's environment (staging or production), the service a machine hosts (login service, for example), or the team responsible for that machine.
팁
The agent collects many details about your environment as part of its default attributes, including Amazon Elastic Compute Cloud (Amazon EC2) tags.
YML option name | Environment variable | Type |
---|---|---|
|
| map[string]interface{} |
Use a list of custom attributes to annotate the data from this agent instance. Separate keys and values with colons :
, as in KEY: VALUE
, and separate each key-value pair with a line break. Keys can be any valid YAML except slashes /
. Values can be any YAML string, including spaces. Starting the key with label.
will make sure it remains as is, even if that host might run in different cloud environments, where the cloud tags or cloud labels might interact with it in the combined decoration of tags. In contrast, custom_labels
might be prefixed with gcp.
or azure.
when running in those environments and when combining data from the infrastructure agent with cloud monitoring together.
Example as a YAML attribute:
custom_attributes: label.environment: production label.service: login service label.team: alpha-team
Example as an environment variable:
NRIA_CUSTOM_ATTRIBUTES='{"label.customAttribute_1":"SOME_ATTRIBUTE","label.customAttribute_2": "SOME_ATTRIBUTE_2"}'
NRQL example filtering by custom attribute:
FROM SystemSample SELECT * WHERE label.environment = 'production'
중요
Requires infrastructure agent version 1.12.0 or higher. Accounts created before July 20, 2020 and/or infrastructure agents installed using the new guided install have this variable enabled by default.
Enables the sending of process metrics to New Relic.
By default, the infrastructure agent doesn't send data about the operating system's processes. The agent still collects such data, unless metrics_process_sample_rate
is set to -1
.
To report metric data about all the operating system's processes, set enable_process_metrics
to true
. To disable, set to false
.
Sending all process data could increase the volume of data sent to New Relic. To fine-tune which processes you want to monitor, configure include_matching_metrics
or exclude_matching_metrics
.
By default, processes using low memory are excluded from being sampled. For more information, see disable-zero-mem-process-filter.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
When enabled, the agent decorates process samples with container information if the process is executed in a container.
This information includes the container ID, container name, image ID, image name, and container labels.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.55.0 |
중요
Currently, this setting only applies to an operating system's processes metrics.
You can control how much data is sent to New Relic by configuring include_matching_metrics
, which allows you to restrict the transmission of metric data based on the values of metric attributes.
You include metric data by defining literal or partial values for any of the attributes of the metric. For example, you can choose to send the host.process.cpuPercent
of all processes whose process.name
match the ^java
regular expression.
In this example, we include process metrics using executable files and names:
include_matching_metrics: # You can combine attributes from different metrics process.name: - regex "^java" # Include all processes starting with "java" process.executable: - "/usr/bin/python2" # Include the Python 2.x executable - regex "\\System32\\svchost" # Include all svchost executables
If you need to include command line arguments in any of the values, set strip_command_line
to false (the infrastructure agents removes CLI arguments by default to prevent secrets from leaking).
If both include_matching_metrics
and exclude_matching_metrics
are present for the same item, the inclusion takes precedence.
To configure include_matching_metrics
as an environment variable for the Kubernetes integration, add it in the manifest inside the env:
object:
env: - name: NRIA_INCLUDE_MATCHING_METRICS value: | process.name: - regex "^java" process.executable: - "/usr/bin/python2" - regex "\\System32\\svchost"
Default
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| metric.attribute: - regex "pattern" - "string" - "string-with-wildcard*" |
중요
Currently, this setting only applies to an operating system's processes metrics.
You can control how much data is sent to New Relic by configuring exclude_matching_metrics
, which allows you to restrict the transmission of metric data based on the values of metric attributes.
You exclude metric data by defining literal or partial values for any of the attributes of the metric. For example, you can choose not to send the host.process.cpuPercent
of all processes whose process.name
match the ^java
regular expression.
In this example, we exclude process metrics using executable files and names:
exclude_matching_metrics: # You can combine attributes from different metrics process.name: - regex "^java" # Exclude all processes starting with "java" process.executable: - "/usr/bin/python2" # Exclude the Python 2.x executable - regex "\\System32\\svchost" # Exclude all svchost executables
To configure exclude_matching_metrics
as an environment variable for the Kubernetes integration, add it in the manifest inside the env:
object:
env: - name: NRIA_EXCLUDE_MATCHING_METRICS value: | process.name: - regex "^java" process.executable: - "/usr/bin/python2" - regex "\\System32\\svchost"
Default
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| metric.attribute: - regex "pattern" - "string" - "string-with-wildcard*" |
You can use the network interface filters configuration to hide unused or uninteresting network interfaces from the infrastructure agent. This helps reduce resource usage, work, and noise in your data.
중요
Environment variables are not supported for this configuration setting.
The configuration uses a simple pattern-matching mechanism that can look for interfaces that start with a specific sequence of letters or numbers following either pattern:
{name}[other characters]
, where you specify the name using theprefix
option[number]{name}[other characters]
, where you specify the name using theindex-1
optionNew Relic infrastructure implements a curated default list of filters, available for both Linux and Windows, that you can modify.
YML option name
Environment variable
Type
Default
Version
network_interface_filters
not supported
map[string][]string
1.0.220
Default network interface filters for Linux:
Network interfaces that start with
dummy
,lo
,vmnet
,sit
,tun
,tap
, orveth
Network interfaces that contain
tun
ortap
The following example (added to your configuration file) overrides the default filters. This will ignore network interfaces that start with
dummy
orlo
, or containtun
preceded by a sequence of numbers, and followed by other characters:network_interface_filters:prefix:- dummy- loindex-1:- tun
Default network interface filters for Windows:
Network interfaces that start with
Loop
,isatap
, orLocal
The following example (added to your configuration file) overrides the default filters. This will ignore network interfaces that start with
Loop
:network_interface_filters:prefix:- Loop
The ZeroRSSFilter
excludes processes that are not using memory from being sampled. Disable the filter so that the agent includes these processes in the ProcessSample
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.0.832 |
Plugins variables
팁
You can quickly disable all the variables by setting DisableAllPlugins
to true
, and turn on only those options you need.
To disable all the plugins, set this option to true
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
Sampling period for the CloudSecurityGroups
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
.
중요
This plugin is activated only if the agent is running in an AWS instance.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Daemontools
plugin, in seconds. The minimum value is a 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Dpkg
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
. If the parameter is not explicitly set in the config file, it can be disabled by setting DisableAllPlugins
to true
.
중요
This is only activated in root
or privileged
running modes and on Debian-based distributions.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Facter
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the KernelModules
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
중요
kernel_modules_refresh_sec
is only activated in root
or privileged
running modes.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
| 1.0.755 |
Sampling period for the NetworkInterface
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
| 1.0.329 |
Sampling period for the Rpm
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
.
중요
rpm_interval_sec
is only activated when the agent runs in root or privileged modes for RedHat, RedHat AWS, or SUSE distributions.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the SELinux
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
. This option is ignored if SelinuxEnableSemodule
is set to false. For more information, see our troubleshooting doc on disabling the SELinux
module.
중요
SELinux
is only activated when the agent runs in root mode.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Sshd
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
| 1.0.755 |
Sampling period for the Supervisor
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Sysctl
plugin, in seconds. The minimum value is 30
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Systemd
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the sysv
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Upstart
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Users
plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
| 1.0.755 |
Location of the supervisor socket.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
| 1.0.2 |
Sets the HOME
environment variable for Puppet's Facter. If not defined, it defaults to the current user's home directory.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
Proxy variables
For infrastructure agent version 1.3.1 or higher, the precedence of the proxy configuration settings is:
NRIA_PROXY
proxy
HTTP_PROXY
HTTPS_PROXY
Your system may have firewall rules that require the agent to use a proxy to communicate with New Relic. If so, set the proxy URL in the form https://user:password@hostname:port. It can be HTTP or HTTPS.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string | Empty |
Example:
https://proxy_user:access_10@proxy_01:1080
When set to true
, the HTTPS_PROXY
and HTTP_PROXY
environment variables are ignored. This is useful when the agent needs to connect directly to the metrics collector and skip the existing system proxy.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
If the HTTPS_PROXY
option references to a proxy with self-signed certificates, this option specifies the path to the the directory where the proxy certificate is available. The certificates in the directory must end with the .pem
extension.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
If the HTTPS_PROXY
option references to a proxy with self-signed certificates, this option specifies the path to the certificate file.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| string |
If set to true
, when the proxy is configured to use an HTTPS connection, it will only work:
If the HTTPS proxy has certificates from a valid Certificate Authority.
If the
ca_bundle_file
orca_bundle_dir
configuration properties contain the HTTPS proxy certificates.YML option name
Environment variable
Type
Default
Version
proxy_validate_certificates
NRIA_PROXY_VALIDATE_CERTIFICATES
boolean
false
1.3.0
Sends the following proxy configuration information as inventory:
HTTPS_PROXY
HTTP_PROXY
proxy ca_bundle_dir
ca_bundle_file
ignore_system_proxy
proxy_validate_certificates
YML option name
Environment variable
Type
Default
Version
proxy_config_plugin
NRIA_PROXY_CONFIG_PLUGIN
boolean
true
1.3.0
If you are having problems with proxy configuration, see Proxy troubleshooting.
Samples variables
Sample rate of network samples, in seconds. Minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Sample rate of process samples, in seconds. Minimum value is 20
. To disable process samples entirely, set metrics_process_sample_rate
to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Sample rate of storage samples, in seconds. Minimum value is 5
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Sample rate of system samples, in seconds. Minimum value is 5
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Sample rate of NFS storage samples, in seconds. Minimum value is 5
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Detailed NFS metrics. When enabled, the agent will provide a complete list of NFS metrics.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
NTP Offset variables
ntp_metrics
is a key-value map used to configure the time offset metric. When enabled and an NTP Hosts list is provided,
the agent will provide the host's ntp offset
metric (in seconds). This value is checked against the provided NTP
hosts pool every interval
minutes (the default and the minumum value is 15 minutes). Between intervals, the last known offset is reported.
If the reported offset is greater than few seconds it can cause issues with alert conditions, NRQL queries and data gaps in dashboards.
Example as a YAML attribute:
ntp_metrics: enabled: true pool: - time.cloudflare.com - time.google.com interval: 15 timeout: 10
Example as an environment variable:
NRIA_NTP_METRICS_POOL='time.cloudflare.com,time.google.com'NRIA_NTP_METRICS_ENABLED='true'NRIA_NTP_METRICS_INTERVAL='15'NRIA_NTP_METRICS_TIMEOUT='10'
Flag to enable/disable the NTP Offset metric.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
Defines list of NTP Hosts to query. When multiple hosts are defined, all of them will be queried and the reported metrics will be the average value between them.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| []string | Empty. Check out the public NTP servers. |
Defines the interval in minutes to request NTP Offset from the provided pool.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Defines the timeout in seconds for the requests made to the NTP hosts.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
|
Security variables
Get versions of policy modules installed using SEModule. If disabled, the SELinux plugin will only retrieve the status using SEStatus.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.0.864 |
When true
, the agent removes the command arguments from the commandLine
attribute of the ProcessSample
.
팁
This is a security measure to prevent leaking sensitive information.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.0.149 |
Status endpoint variables
Enables the status server on the agent providing local health information. The available endpoints are:
Main status endpoint example (with no errors):
$curl http://localhost:8003/v1/status{ "checks": { "endpoints": [ { "url": "https://infrastructure-command-api.newrelic.com/agent_commands/v1/commands", "reachable": true }, { "url": "https://infra-api.newrelic.com/infra/v2/metrics", "reachable": true }, { "url": "https://identity-api.newrelic.com/identity/v1", "reachable": true }, { "url": "https://infra-api.newrelic.com/inventory", "reachable": true } ] }, "config": { "reachability_timeout": "10s" }}
Main status endpoint (with errors):
$curl http://localhost:8003/v1/status{ "checks": { "endpoints": [ { "url": "https://staging-infra-api.newrelic.com/infra/v2/metrics", "reachable": false, "error": "endpoint check timeout exceeded" }, { "url": "https://infra-api.newrelic.com/infra/v2/metrics", "reachable": true }, { "url": "https://identity-api.newrelic.com/identity/v1", "reachable": true }, { "url": "https://infra-api.newrelic.com/inventory", "reachable": true } ] }, "config": { "reachability_timeout": "10s" }}
Errors endpoint example:
$curl http://localhost:18003/v1/status/errors{ "checks": { "endpoints": [ { "url": "https://staging-infra-api.newrelic.com/infra/v2/metrics", "reachable": false, "error": "endpoint check timeout exceeded" } ] }, "config": { "reachability_timeout": "10s" }}
This is similar to the main status endpoint but filtering those with errors only.
Entity endpoint example:
$curl http://localhost:8003/v1/status/entity{ "guid":"MMMMNjI0NjR8SU5GUkF8TkF8ODIwMDg3MDc0ODE0MTUwNTMy", "key":"your-host-name"}
Returns information about the agent/host entity. A response status code 204 ("No Content") will be returned when the agent still has no information about the agent/host entity. Therefore, it may take several requests to until the agent provides entity data.
중요
This setting is enabled by default when you use the guided install. It helps confirm that the agent installation was successful.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.19.0 |
Defines the port for the status server endpoint.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| integer |
| 1.19.0 |
Windows variables
Sampling period for the Windows services plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Sampling period for the Windows updates plugin, in seconds. The minimum value is 10
. To disable it, set it to -1
.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| int64 |
|
Defines the path to store data in a different path than the program files directory:
%AppDir%/data
: Used for storing the delta data%AppDir%/user_data
: External directory for user-generated JSON files%AppDir%/newrelic-infra.log
: If log file config option is not defined, then we use this directory path as default.YML option name
Environment variable
Type
Default
Version
app_data_dir
NRIA_APP_DATA_DIR
string
Windows:
env(ProgramData)\New Relic\newrelic-infra
Linux: Not applicable
Enables the Windows updates plugin, which retrieves the lists of hotfixes that are installed on the host.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
| 1.0.274 |
If true
, the agent will be forced to use Windows WMI (the agent's legacy method to grab metrics for Windows; for example, StorageSampler
) and will disable the new method (which uses the PDH library).
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
This configuration option allows to increase the newrelic-infra.exe
process priority to any of the following values:
Normal
Idle
High
RealTime
BelowNormal
AboveNormal
YML option name
Environment variable
Type
Default
Version
win_process_priority_class
NRIA_WIN_PROCESS_PRIORITY_CLASS
string
1.0.989
Example:
Normal
Enables the Windows agent to report drives A:
and B:
when they are mapped as removable drives.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
If you set it to true, you'll get process information from WMI and you'll skip the query access check on a restricted environment.
YML option name | Environment variable | Type | Default | Version |
---|---|---|---|---|
|
| boolean |
|
HTTP Client
Configure the HTTP client used for backend communication.
Custom HTTP headers to include in all requests to the New Relic backend.
http: headers: "Proxy-Authorization": "myToken"
YML option name | Environment variable | Type | Version |
---|---|---|---|
|
| key-value map |
What's next?
You can also:
- Further understand the configuration of the agent.
- Create a configuration file using our template.
- See how you can manage the agent.