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:
- New Relic Infrastructure installed on host
- Linux distribution compatible with New Relic Infrastructure
- NGINX extension enabled, as described in the Configure the integration section
Install and activate the integration
To install the NGINX integration:
Follow the instructions for installing an integration, using the file name
Via the command line, change the directory to the integrations configuration folder:
Create a copy of the sample configuration file by running:
sudo cp nginx-config.yml.sample nginx-config.yml
Edit the configuration file
- 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 127.0.0.1 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.
envlabel controls the
environmentattribute in Insights. The default value is
Activating remote monitoring
For version 1.1.0 or higher, a new configuration parameter called
remote_monitoring enables remote monitoring and multi-tenancy for this integration.
remote_monitoring may change some attributes and/or affect your configured alerts. For more information, see remote monitoring in on-host integrations.
*Infrastructure agent version 1.2.25 or higher is required to use
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 Default http://127.0.0.1/status
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 infrastructure.newrelic.com > Third-party services and select one of the NGINX integration links.
The NGINX integration collects the following metric data attributes. To find these attributes, query the
NginxSample event type in Insights.
NGINX Open Source metrics
||Number of accepted client connections per second.|
||Number of connections that are currently active.|
||Number of connections per second that were accepted but could not he handled and hence dropped.|
||Current number of connections where NGINX is reading the request header.|
||Current number of idle client connections waiting for a request.|
||Current number of connections where NGINX is writing the response back to the client.|
||Total number of client requests per second.|
NGINX Plus metrics
||Accepted client connections as requests per second.|
||Dropped client connections as requests per second.|
||Current number of active client connections.|
||Current number of idle client connections.|
||Number of requests per second.|
The integration captures configuration options defined in the NGINX master config file (usually
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
The integration collects these additional attributes about the NGINX service:
The NGINX edition: either
||The version of NGINX.|