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.
To install the NGINX monitoring integration, you must run through the following steps:
- Enable your NGINX Server.
- Install and activate the integration.
- Configure the integration.
- Find and use data.
- Optionally, see NGINX's configuration settings.
Important
For best results, regularly update the integration package and the infrastructure agent.
Compatibility and requirements
Our integration is compatible with both NGINX Open Source and NGINX Plus. Before installing the integration, ensure you meet the following requirements:
- A New Relic account. Don't have one? Sign up for free! No credit card required.
- NGINX extension enabled, as described in the Enable your NGINX Server section.
- If NGINX is not running on Kubernetes or Amazon ECS, you must install the infrastructure agent on a Linux or Windows OS host that's running NGINX. Otherwise:
- If running on
Kubernetes, see these requirements.
- If running on
Amazon ECS, see these requirements.
- If running on
Supported operating systems
- Windows
- Linux
For a comprehensive list of specific Windows and Linux versions, check the table of compatible operating systems.
Enable your NGINX Server
To capture data from the NGINX integration, you must first enable and configure the applicable extension module:
- For NGINX Open Source, see HTTP stub status module.
- For NGINX Plus, see HTTP status module and HTTP API module.
Install and activate the integration
To install the NGINX integration, follow the instructions for your environment:
Linux installation
Install the infrastructure agent, and replace the
INTEGRATION_FILE_NAME
variable withnri-nginx
.Change the 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
configuration file with your favorite editor. Check out some configuration file examples..Restart the infrastructure agent. See how to restart the infrastructure agent in different Linux environments.
To enable automatic NGINX access and error log parsing and forwarding, copy (or rename) the
nginx-log.yml.example
file tonginx-log.yml
. No need to restart the agent.bash$sudo cp /etc/newrelic-infra/logging.d/nginx-log.yml.example /etc/newrelic-infra/logging.d/nginx-log.yml
Other environments
Additional notes:
- 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.
Did this doc help with your installation?
Configure the integration
There are several ways to configure the integration, depending on how it was installed:
- If it was enabled via
Kubernetes, see Monitor services running on Kubernetes.
- If it was enabled via
Amazon ECS, see Monitor services running on ECS.
- If it was installed on-host, edit the integration's
nginx-config.yml
configuration file. An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. The options you change depend on your setup and preference. The configuration file has common settings applicable to all integrations such asinterval
,timeout
, orinventory_source
. To read about these common settings, see configuration format.
Important
If you are still using our Legacy configuration and definition files, 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-config.yml sample files
Configuration options for the integration
For more on how to find and use your data, see NGINX's configuration settings.
Find and use data
After you've configured and installed the integration, you can start monitoring:
- Data from this service, which is reported to an integration dashboard.
- Metrics that are attached to the
NginxSample
event type. You can query this data for troubleshooting purposes or to create custom charts and dashboards. - Logs will be visible in the logs UI.
For more on how to find and use your data, see how to understand integration data.
Metrics collected by the integration
The NGINX integration collects the following metrics: