Skip to content

Latest commit

 

History

History

nginxreceiver

Nginx Receiver

Status
Stability beta: metrics
Distributions contrib, observiq, sumo

This receiver can fetch stats from a Nginx instance using the ngx_http_stub_status_module module's status endpoint.

Details

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

ℹ️ This receiver is in beta and configuration fields are subject to change.

The following settings are required:

  • endpoint (default: https://localhost:80/status): The URL of the nginx status endpoint

The following settings are optional:

  • collection_interval (default = 10s): This receiver runs on an interval. Each time it runs, it queries nginx, creates metrics, and sends them to the next consumer. The collection_interval configuration option tells this receiver the duration between runs. This value must be a string readable by Golang's ParseDuration function (example: 1h30m). 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: "https://localhost:80/status"
    collection_interval: 10s

The full list of settings exposed for this receiver are documented here with detailed sample configurations here.

Feature gate configurations

See the Collector feature gates for an overview of feature gates in the collector.

ALPHA: receiver.nginx.emitCurrentConnectionsAsSum

The feature gate receiver.nginx.emitConnectionsCurrentAsSum once enabled will change the data type of the nginx.connections_current metric from a gauge to a non-monotonic sum.

This feature gate will eventually be enabled by default, and eventually the old implementation will be removed. It aims to give users time to migrate to the new implementation. The target release for this featuregate to be enabled by default is 0.80.0.