---
title: NGINX Metrics
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > OpenTelemetry in Datadog > Integrations > NGINX Metrics
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# NGINX Metrics

## Overview{% #overview %}

{% image
   source="https://docs.dd-static.net/images/opentelemetry/collector_exporter/nginx_metrics.e1b54fb86a275e25a45e1ad7d912282c.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/opentelemetry/collector_exporter/nginx_metrics.e1b54fb86a275e25a45e1ad7d912282c.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="OpenTelemetry NGINX metrics in a NGINX dashboard" /%}

The [NGINX receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/nginxreceiver) collects NGINX metrics that populate the [NGINX Overview](https://app.datadoghq.com/dash/integration/21/nginx---overview) dashboard.

For more information, see the OpenTelemetry project documentation for the [NGINX receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/nginxreceiver).

## Setup{% #setup %}

This example uses component identifiers from OpenTelemetry Collector Contrib v0.154.0. For other versions or distributions, use the identifiers your distribution supports.

The NGINX receiver reads the status page from the [`ngx_http_stub_status_module`](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html) module. Before you start, enable the module and expose a status page. Limit access to the status page, for example to localhost.

Add the following lines to your Collector configuration, and set `endpoint` to the address of your status page:

```yaml
receivers:
  nginx:
    endpoint: http://localhost:80/status
```

Add `nginx` to the `receivers` list of the metrics pipeline in your configuration. Keep the processors already in that pipeline. The Datadog OTLP metrics intake accepts only delta metrics, and this receiver produces cumulative sums, so the pipeline needs `cumulativetodelta`. The [recommended Collector setup](https://docs.datadoghq.com/opentelemetry/setup/collector_exporter.md) includes it.

For all configuration options, see the [NGINX receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/nginxreceiver).

## Data collected{% #data-collected %}

| OTEL                       | DESCRIPTION                                                  | FILTER             |
| -------------------------- | ------------------------------------------------------------ | ------------------ |
| nginx.connections_accepted | The total number of accepted client connections              |
| nginx.connections_current  | The current number of nginx connections by state             | `state`: `waiting` |
| nginx.connections_current  | The current number of nginx connections by state             | `state`: `active`  |
| nginx.requests             | Total number of requests made to the server since it started |

For the full mapping between OpenTelemetry and Datadog metric names, see [OpenTelemetry Metrics Mapping](https://docs.datadoghq.com/opentelemetry/guide/metrics_mapping.md).

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Setting Up the OpenTelemetry Collector](https://docs.datadoghq.com/opentelemetry/collector_exporter.md)
