Skip to main content

Nginx Receiver

Status Available in: contrib Maintainers: @colelaven, @ishleenk17 Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

Configuration

NGINX Module

You must configure NGINX to expose status information by editing the NGINX configuration. Please see ngx_http_stub_status_module for a guide to configuring the NGINX stats module ngx_http_stub_status_module.

Receiver Config

The following settings are required:
  • endpoint (default: http://localhost:80/status): The URL of the NGINX status endpoint
The following settings are optional:
  • collection_interval (default = 10s): This receiver collects metrics on an interval. This value must be a string readable by Golang’s time.ParseDuration. Valid time units are ns, us (or µs), ms, s, m, h.
  • initial_delay (default = 1s): defines how long this receiver waits before starting.
Example:
receivers:
  nginx:
    endpoint: "http://localhost:80/status"
    collection_interval: 10s
The full list of settings exposed for this receiver are documented in config.go with detailed sample configurations in testdata/config.yaml.

Metrics

Metric NameDescriptionUnitTypeAttributes
✅ nginx.connections_acceptedThe total number of accepted client connectionsconnectionsCounter
✅ nginx.connections_currentThe current number of nginx connections by stateconnectionsUpDownCounterstate
✅ nginx.connections_handledThe total number of handled connections. Generally, the parameter value is the same as nginx.connections_accepted unless some resource limits have been reached (for example, the worker_connections limit).connectionsCounter
✅ nginx.requestsTotal number of requests made to the server since it startedrequestsCounter

Attributes

Attribute NameDescriptionTypeValues
stateThe state of a connectionstringactive, reading, writing, waiting

Configuration

Example Configuration

nginx:
  endpoint: "http://localhost:80/status"
  collection_interval: 10s

Last generated: 2026-04-13