Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/send-data/alloy/reference/components/otelcol/otelcol.receiver.nginx.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/send-data/alloy/reference/components/otelcol/otelcol.receiver.nginx/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
otelcol.receiver.nginx
EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement. To enable and use an experimental component, you must set the
stability.levelflag toexperimental.
otelcol.receiver.nginx reads NGINX metrics and forwards them to other otelcol.* components.
Note
otelcol.receiver.nginxis a wrapper over the upstream OpenTelemetry Collectornginxreceiver. Bug reports or feature requests will be redirected to the upstream repository, if necessary.
This receiver supports NGINX. Refer to the upstream nginx receiver documentation for more details.
You can specify multiple otelcol.receiver.nginx components by giving them different labels.
Usage
otelcol.receiver.nginx "<LABEL>" {
endpoint = "http://localhost:80/status"
collection_interval = "10s"
initial_delay = "1s"
output {
metrics = [...]
}
}Arguments
You can use the following arguments with otelcol.receiver.nginx:
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
endpoint | string | The URL of the NGINX status endpoint. | yes | |
collection_interval | duration | Defines how often to collect metrics. | "10s" | no |
initial_delay | duration | Defines how long this receiver waits before it starts. | "1s" | no |
Blocks
You can use the following blocks with otelcol.receiver.nginx:
No valid configuration blocks found.
output
RequiredThe output block configures a set of components to forward resulting telemetry data to.
The following arguments are supported:
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
logs | list(otelcol.Consumer) | List of consumers to send logs to. | [] | no |
metrics | list(otelcol.Consumer) | List of consumers to send metrics to. | [] | no |
traces | list(otelcol.Consumer) | List of consumers to send traces to. | [] | no |
You must specify the output block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the metrics, logs, and traces arguments accordingly to send telemetry data to other components.
debug_metrics
The debug_metrics block configures the metrics that this component generates to monitor its state.
The following arguments are supported:
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
disable_high_cardinality_metrics | boolean | Whether to disable certain high cardinality metrics. | true | no |
disable_high_cardinality_metrics is the Alloy equivalent to the telemetry.disableHighCardinalityMetrics feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.
Note
If configured,
disable_high_cardinality_metricsonly applies tootelcol.exporter.*andotelcol.receiver.*components.
Exported fields
otelcol.receiver.nginx doesn’t export any fields.
Component health
otelcol.receiver.nginx is only reported as unhealthy if given an invalid configuration.
Debug information
otelcol.receiver.nginx doesn’t expose any component-specific debug information.
Example
The following example collects all available metrics from an NGINX server and forwards them to an exporter.
otelcol.receiver.nginx "default" {
endpoint = "http://localhost:80/status"
output {
metrics = [otelcol.exporter.otlp.default.input]
}
}
otelcol.exporter.otlp "default" {
client {
endpoint = env("<OTLP_ENDPOINT>")
}
}Compatible components
otelcol.receiver.nginx can accept arguments from the following components:
- Components that export OpenTelemetry
otelcol.Consumer
Note
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.
Was this page helpful?
Related resources from Grafana Labs


