Our NGINX integration collects and sends inventory and metrics from your NGINX server to our platform, where you can see data on connections and client requests so that you can find the source of any problems.
Read on to install the integration, and to see what data we collect.
Compatibility and requirements
Our integration is compatible with both NGINX Open Source and NGINX Plus.
Before installing the integration, make sure that you meet the following requirements:
- Requires Infrastructure Pro subscription or trial.
- NGINX extension enabled, as described in the Configure the integration section.
- If NGINX is not running on Kubernetes or Amazon ECS, you must have the New Relic Infrastructure agent installed on a Linux OS host that's running NGINX. Otherwise:
This integration is released as open source under the MIT license on Github.
Install and activate the integration
To install the NGINX integration, follow the instructions for your environment:
Follow the general instructions for installing an integration, using the file name
nri-nginx. Then continue on to the steps below.
Change the directory to the integrations configuration folder:
Copy the sample configuration file:
sudo cp nginx-config.yml.sample nginx-config.yml
Edit the configuration file
- Restart the Infrastructure agent.
- Advanced: Integrations are also available in tarball format to allow for install outside of a package manager.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the Infrastructure agent.
Configure the integration
To capture data from the NGINX integration, you must first enable and configure the applicable extension module:
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Kubernetes: see Monitor services running on Kubernetes.
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config file,
Config options include:
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.1is 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. The default value is
Activate remote monitoring
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 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 Default
The path to the NGINX configuration file.
Type String Default /etc/nginx/nginx.conf
Find and use data
Data from this service is reported to an integration dashboard.
For more on how to find and use your data, see Understand integration data.
The NGINX integration collects the following metric data attributes. To find these attributes, query the
NginxSample event type.
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.|