NGINX monitoring integration

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

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.

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.

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 127.0.0.1 is incorrect, substitute the address/FQDN/URL for your system. Example:

      status_url: http://127.0.0.1/status
  • 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.

Find and use data

To find your integration data in Infrastructure, go to infrastructure.newrelic.com > Integrations > On-host integrations 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.

Metrics

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
software.edition

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

software.version The version of NGINX.

For more help

Recommendations for learning more: