• /
  • Log in

NGINX monitoring integration

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:

Quick start

Instrument your NGINX server quickly and send your telemetry data with guided install. Our guided install creates a customized CLI command for your environment that downloads and installs the New Relic CLI and the infrastructure agent.

A screenshot of the guided install CLI.

Ready to get started? Click one of these button to try it out.

Guided install

Our guided install uses the infrastructure agent to set up the NGINX integration. Not only that, it discovers other applications and log sources running in your environment and then recommends which ones you should instrument.

The guided install works with most setups. But if it doesn't suit your needs, you can find other methods below to get started monitoring your NGINX server.

Install and activate the integration

To install the NGINX integration, follow the instructions for your environment:

Additional notes:

Configuration

Enabling your NGINX Server

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

Configure the integration

There are several ways to configure the integration, depending on how it was installed:

An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.

The configuration file has common settings applicable to all integrations like interval, timeout, inventory_source. To read all about these common settings refer to our Configuration Format document.

Important

If you are still using our Legacy configuration/definition files please refer to this document for help.

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.

NGINX Instance Settings

The NGINX integration collects both Metrics and Inventory information. Check the Applies To column below to find which settings can be used for each specific collection:

Setting

Description

Default

Applies To

STATUS_URL

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

http://127.0.0.1/status

Metrics/Inventory

STATUS_MODULE

Name of NGINX status module.
Valid options are:

  • discover
  • ngx_http_stub_status_module
  • ngx_http_status_module
  • ngx_http_api_module"

discover

Metrics

CONNECTION_TIMEOUT

Connection timeout to the NGINX instance in seconds.

5

Metrics

VALIDATE_CERTS

Set to false if the status URL is HTTPS with a self-signed certificate.

true

Metrics

CONFIG_PATH

The path to the NGINX configuration file.

N/A

Inventory

REMOTE_MONITORING

Enable multi-tenancy monitoring.

true

Metrics/Inventory

METRICS

Set to true to enable Metrics only collection.

false

INVENTORY

Set to true to enable Inventory only collection.

false

The values for these settings can be defined in several ways:

  • Adding the value directly in the config file. This is the most common way.
  • Replacing the values from environment variables using the {{}} notation. This requires infrastructure agent v1.14.0+. Read more here or see example below.
  • Using Secrets management. Use this to protect sensible information such as passwords to be exposed in plain text on the configuration file. For more information, see Secrets management.

Labels/Custom Attributes

You can further decorate your metrics using labels. Labels allow you to add key/value pairs attributes to your metrics which you can then use to query, filter or group your metrics on.
Our default sample config file includes examples of labels but, as they are not mandatory, you can remove, modify or add new ones of your choice.

labels:
env: production
role: load_balancer

Example configurations

Find and use data

Data from this service is reported to an integration dashboard.

Metrics are attached to the NginxSample event type. You can query this data for troubleshooting purposes or to create custom charts and dashboards.

For more on how to find and use your data, see Understand integration data.

Metrics

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

NGINX Open Source

Metric

Description

net.connectionsActive

Number of connections that are currently active

net.connectionsAcceptedPerSecond

Number of accepted client connections per second

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

NGINX Plus

Our integration retrieves all available metric data from the following HTTP API endpoints: /nginx, /processes, /connections, /http/requests, and /ssl.

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.requests

Current number of requests

net.requestsPerSecond

Current number of requests per second

processes.respawned

Current number of abnormally terminated and respawned child processes

ssl.handshakes

Current number for successful SSL handshakes

ssl.failedHandshakes

Current number of failed SSL handshakes

ssl.sessionReuses

Current number of session reuses during SSL handshake

Inventory data

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

Tip

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.

Check the source code

This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.