• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

Monitor self-hosted NGINX with OpenTelemetry

This guide provides complete setup instructions for monitoring self-hosted NGINX with OpenTelemetry. Follow these steps to configure your NGINX server, OpenTelemetry Collector, and New Relic integration.

Before you begin

Before you start, ensure you have:

Verify your setup

Check NGINX status module:

bash
$
nginx -V 2>&1 | grep -o with-http_stub_status_module

Expected output: with-http_stub_status_module

Check OpenTelemetry Collector:

bash
$
otelcol-contrib --version

Expected output: Version information (minimum v0.88.0 required)

Test network connectivity:

bash
$
# For US region
$
curl -I https://otlp.nr-data.net:443

Expected output: HTTP response headers (not connection refused)

ヒント

If any verification step fails, install the missing components before continuing. Need help installing the Collector? Check the OpenTelemetry Collector installation guide.

Step 1: Configure NGINX stub status

Configure the stub_status module to expose metrics from your NGINX server. This module provides basic performance statistics that OpenTelemetry will collect.

Step 2: Configure the OpenTelemetry Collector

Configure the OpenTelemetry Collector to scrape metrics from your NGINX stub status endpoint and send them to New Relic.

Step 3: Set up authentication

Configure secure authentication so the OpenTelemetry Collector can send data to your New Relic account. This step sets up environment variables to keep your credentials secure.

Step 4: Start monitoring

Now that everything is configured, start the OpenTelemetry Collector and verify that data is flowing to New Relic.

Step 5: (Optional) Forward NGINX logs

In addition to metrics, you can send NGINX access and error logs to New Relic for comprehensive monitoring and troubleshooting. These logs complement the core NGINX metrics and provide detailed request-level insights.

ヒント

Skip this step if: You only need basic NGINX metrics and don't require detailed request logs.

View your data in New Relic

Once your setup is complete and data is flowing, you can access your NGINX metrics in New Relic dashboards and create custom alerts.

For complete instructions on accessing dashboards, querying data with NRQL, and creating alerts, see Find and query your NGINX data.

Troubleshooting

If you encounter issues during setup, use this troubleshooting guide to diagnose and resolve common problems.

Get help

If you continue experiencing issues:

  1. Review New Relic's OpenTelemetry best practices
  2. Search the New Relic Explorers Hub for similar issues

Next steps

Learn more about your data:

Explore related monitoring:

Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.