• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

Monitor self-hosted NGINX Plus with OpenTelemetry

Monitor your NGINX Plus servers running on a host using the OpenTelemetry Collector to send metrics and telemetry data to New Relic.

This integration leverages the OpenTelemetry prometheusreceiver and nginx-prometheus-exporter to monitor your NGINX Plus performance metrics, connection statistics, and server health. The rich HTTP API in NGINX Plus provides significantly more detailed metrics compared to the basic stub status module in standard NGINX.

Image of the NGINX dashboard

Dashboard available through the New Relic NGINX OpenTelemetry Monitor quickstart.

Before you begin

Before you begin, ensure you have:

  • A New Relic account with a
  • NGINX Plus version R13 or higher
  • NGINX Plus with the HTTP API module enabled
  • NGINX Prometheus exporter installed and running alongside your NGINX Plus instance to expose HTTP API metrics in Prometheus format
  • OpenTelemetry Collector Contrib installed and running on a linux host
  • Network access from the linux host to:

Verify your setup

Check NGINX Plus version:

bash
$
nginx -V 2>&1 | grep -o "nginx/[0-9.]*"

Expected output: nginx/1.25.0 or higher (R13+)

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:4318/v1/metrics
$
# For EU region
$
curl -I https://otlp.eu01.nr-data.net:4318/v1/metrics

Expected output: HTTP/2 405 (method not allowed is expected)

Step 1: Configure NGINX Plus

Configure and enable the HTTP API module to expose metrics from your NGINX Plus server.

Step 2: Configure the OpenTelemetry Collector

Configure the OpenTelemetry Collector to scrape metrics from your NGINX Plus Prometheus exporter and send them to New Relic.

Step 3: Set environment variables for the collector

Inject your New Relic and OTLP endpoint into the collector service so the exporter can authenticate.

Step 4: Verify data collection

Confirm that the OpenTelemetry Collector is successfully collecting NGINX Plus metrics and sending them to New Relic.

Step 5: (Optional) Forward NGINX logs

Extend your collector configuration to include access and error logs if you want log events alongside metrics.

Configure NGINX Plus log format

Before forwarding logs, configure NGINX Plus to use a structured log format. Refer to the NGINX logging documentation for guidance on configuring access and error logs.

Configure the OpenTelemetry Collector for log forwarding

  1. Note the full paths to your NGINX access and error log files. Defaults are usually /var/log/nginx/access.log and /var/log/nginx/error.log.

  2. Update /etc/otelcol-contrib/config.yaml to add a filelog receiver and log pipeline:

    receivers:
    prometheus:
    # existing Prometheus receiver configuration
    filelog/nginx_access_logs:
    include:
    - /var/log/nginx/access.log
    filelog/nginx_error_logs:
    include:
    - /var/log/nginx/error.log
    processors:
    batch:
    # existing settings
    filter/nginx_metrics:
    # existing settings
    resourcedetection:
    # existing settings
    resource/nginx:
    # existing settings
    transform/nginx_metrics:
    # existing settings
    transform/nginx_access_logs:
    log_statements:
    - context: resource
    statements:
    - set(attributes["nginx.display.name"], Concat(["server", attributes["nginx.deployment.name"]], ":"))
    - set(attributes["logtype"], "nginx")
    transform/nginx_error_logs:
    log_statements:
    - context: resource
    statements:
    - set(attributes["nginx.display.name"], Concat(["server", attributes["nginx.deployment.name"]], ":"))
    - set(attributes["logtype"], "nginx-error")
    exporters:
    # existing exporter setup
    service:
    pipelines:
    metrics/nginx:
    receivers: [prometheus]
    processors: [batch, filter/nginx_metrics, resourcedetection, resource/nginx, transform/nginx_metrics]
    exporters: [otlphttp/newrelic]
    logs/nginx-access:
    receivers: [filelog/nginx_access_logs]
    processors: [batch, resource/nginx, transform/nginx_access_logs]
    exporters: [otlphttp/newrelic]
    logs/nginx-error:
    receivers: [filelog/nginx_error_logs]
    processors: [batch, resource/nginx, transform/nginx_error_logs]
    exporters: [otlphttp/newrelic]
  3. Grant the otelcol-contrib user read access to the log files:

    bash
    $
    sudo usermod -a -G adm otelcol-contrib
    $
    sudo chmod 644 /var/log/nginx/access.log
    $
    sudo chmod 644 /var/log/nginx/error.log
  4. Restart the collector to apply the changes:

    bash
    $
    sudo systemctl restart otelcol-contrib

Find and use data

  1. Go to one.newrelic.com > Integrations & Agents.
  2. Select Dashboards, and click NGINX OTel overview dashboard.
  3. In the popup window, select your account.
  4. Click View dashboard, and see your NGINX Plus data in New Relic.

The NGINX Plus metrics are attached to the Metric event type. You can query this data for troubleshooting purposes or to create custom charts and dashboards.

Metrics collected

The OpenTelemetry Collector scrapes metrics from the NGINX Prometheus exporter, which exposes NGINX Plus HTTP API metrics in Prometheus format.

Below are the available NGINX Plus metrics:

Next steps

Learn more about your data:

Explore related monitoring:

NGINX Plus resources:

Copyright © 2026 New Relic Inc.

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