NGINX monitoring integration

New Relic Infrastructure provides an NGINX integration for instrumenting your NGINX instances. This document explains how to install and activate the NGINX integration, and describes the data the integration collects.

This integration is released as open source under the MIT license on Github. A change log is also available there for the latest updates.

Access to this feature depends on your subscription level. Requires Infrastructure Pro.

Compatibility and requirements

The NGINX integration is compatible with both NGINX Open Source and NGINX Plus.

To use the NGINX integration, ensure your system meets these requirements:

Install and activate the integration

On-host integrations do not automatically update. For best results, you should occasionally update the integration and update the Infrastructure agent.

To install the NGINX integration:

  1. Follow the instructions for installing an integration, using the file name nri-nginx.

  2. Via the command line, change the directory to the integrations configuration folder:

    cd /etc/newrelic-infra/integrations.d
  3. Create a copy of the sample configuration file by running:

    sudo cp nginx-config.yml.sample nginx-config.yml
  4. Edit the configuration file nginx-config.yml.

  5. Restart the Infrastructure agent.

It is also possible to manually install integrations from a tarball file. For more information, see Install manually from a tarball archive.

Configure the integration

To capture data from the NGINX integration, you must first enable and configure the applicable extension module:

An integration's config file is the place to include required login credentials and configure how data is collected. This config file includes these editable commands and values:

  • metrics: This command captures the metrics of a particular NGINX server. Arguments:

    • status_url: The URL set up to provide the metrics using the status module. If the default value of is incorrect, substitute the address/FQDN/URL for your system. Example:

  • inventory: This command captures the configuration parameters set in the NGINX config file as inventory data. Arguments:
    • config_path: The path to the NGINX configuration file.

    To disable inventory data collection, you would delete the inventory command.

  • labels: The env label controls the environment attribute in Insights. The default value is production.

Activating remote monitoring

For NGINX integration version 1.1.0 or higher, you can use the remote_monitoring configuration parameter to enable remote monitoring and multi-tenancy for this integration. You must also have Infrastructure agent version 1.2.25 or higher to use remote_monitoring.

Activating remote_monitoring may change some attributes and/or affect your configured alerts. For more information, see remote monitoring in on-host integrations.

Environment variable passthroughs

Environment variables can be used to control config settings, and are then passed through to the Infrastructure agent. For instructions on how to use this feature, see Configure the Infrastructure agent.


The URL set up to provide the metrics using the status module.

Type String



The path to the NGINX configuration file.

Type String
Default /etc/nginx/nginx.conf



Find and use data

To find your integration data in Infrastructure, go to > Third-party services and select one of the NGINX integration links.

In New Relic Insights, NGINX data is attached to the NginxSample event type. For more on how to find and use your data, see Understand and use integration data.


The NGINX integration collects the following metric data attributes. To find these attributes, query the NginxSample event type in Insights.

Metric Description
net.connectionsAcceptedPerSecond Number of accepted client connections per second.
net.connectionsActive Number of connections that are currently active.
net.connectionsDroppedPerSecond Number of connections per second that were accepted but could not he handled and hence dropped.
net.connectionsReading Current number of connections where NGINX is reading the request header.
net.connectionsWaiting Current number of idle client connections waiting for a request.
net.connectionsWriting Current number of connections where NGINX is writing the response back to the client.
net.requestsPerSecond Total number of client requests per second.
Metric Description
net.connectionsAcceptedPerSecond Accepted client connections as requests per second.
net.connectionsDroppedPerSecond Dropped client connections as requests per second.
net.connectionsActive Current number of active client connections.
net.connectionsIdle Current number of idle client connections.
net.requestsPerSecond Number of requests per second.

Inventory data

The integration captures configuration options defined in the NGINX master config file (usually nginx.conf).

The master NGINX config file can contain "include OTHER_FILE_NAME" commands for splitting the configuration into multiple files. The Infrastructure agent ignores (does not parse) configuration set via include commands.

System metadata

The integration collects these additional attributes about the NGINX service:

Name Description

The NGINX edition: either "open source" or "plus".

software.version The version of NGINX.

For more help

Recommendations for learning more: