Nginx monitoring integration
Our NGINX integration collects and sends inventory, logs, 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.
![NGINX quickstart dashboard Image of the dashboard available through the NGINX quickstart](/images/infrastructure_screenshot-nginx-dashboard-cropped..webp)
Dashboard installed through the New Relic NGINX Monitor quickstart.
To get the most out of this page, select the installation method that fits your environment. You need a New Relic account to finish the installation process.
Choose your framework
Choose your install path
Check the compatibility and requirements
Our integration is compatible with both NGINX Open Source and NGINX Plus.
Download the infrastructure agent
To use the NGINX integration, you need to first install the infrastructure agent on the same host. The infrastructure agent monitors the host itself, while the integration you'll install in the next step extends your monitoring with NGINX-specific data, such as connections and request metrics.
Download using APT
Run the following commands:
bash$sudo apt-get updatebash$sudo apt-get install nri-nginx
Configure the NGINX integration
Change directory to the integrations configuration folder by running:
bash$cd /etc/newrelic-infra/integrations.dCopy the sample configuration file by running:
bash$sudo cp nginx-config.yml.sample nginx-config.ymlEdit the
nginx-config.yml
file. This example config file collects basic metrics like Metrics and Inventory:integrations:- name: nri-nginxenv:METRICS: "true"STATUS_URL: http://127.0.0.1/statusSTATUS_MODULE: discoverREMOTE_MONITORING: trueinterval: 30slabels:env: productionrole: load_balancer- name: nri-nginxenv:INVENTORY: "true"STATUS_URL: http://127.0.0.1/statusCONFIG_PATH: /etc/nginx/nginx.confREMOTE_MONITORING: trueinterval: 60slabels:env: productionrole: load_balancerinventory_source: config/nginx
Specific settings related to NGINX are defined using the env:
section of the configuration file. These settings control the connection to your NGINX instance as well as other security settings and features. The list of valid settings is described in the next section of this document.
You can find all the config options at the bottom of this doc along with more complex config examples.
Find and use data
- Go to one.newrelic.com > Integrations & Agents and type NGINX.
- Select Dashboards, and click NGINX overview dashboard.
- In the popup window, select your account
- Click View dashboard, and see your NGINX data in New Relic.
Metrics that are attached to the NginxSample
event type. You can query this data for troubleshooting purposes or to create custom charts and dashboards.
You can find a full list of metrics and their attributes at the bottom of this doc.
For more on how to find and use your data, see how to understand integration data.
NGINX config settings
The following configuration options are available:
Setting | Description | Default | Applies to |
---|---|---|---|
| The URL set up to provide the metrics using the status module. |
| Metrics/Inventory |
| Name of NGINX status module.
|
| Metrics |
| Connection timeout to the NGINX instance in seconds. |
| Metrics |
| Set to |
| Metrics |
| The path to the NGINX configuration file. | N/A | Inventory |
| Enable multi-tenancy monitoring. Read more about remote monitoring. |
| Metrics/Inventory |
| Set to |
| |
| Set to |
|
Metric data
The NGINX integration collects the following metrics: