$linuxjunkies
>

otelcol(8)

OpenTelemetry Collector is a vendor-agnostic agent that receives, processes, and exports telemetry data from applications and infrastructure.

UbuntuDebianFedoraArch

Synopsis

otelcol [OPTION]... [--config=FILE]

Description

The OpenTelemetry Collector (otelcol) is a standalone service that collects traces, metrics, and logs from applications and infrastructure, then processes and exports them to backend systems like Jaeger, Prometheus, or cloud observability platforms. It acts as a bridge between instrumented services and telemetry backends.

The collector uses a pipeline architecture: receivers accept data in various formats, processors transform and filter it, and exporters send it to destinations. Configuration is typically provided via a YAML file that defines these components and their interactions.

Common options

FlagWhat it does
--config, -cPath to the collector configuration file (YAML format)
--setSet a configuration value using the key=value format (can be used multiple times)
--feature-gatesComma-separated list of feature gates to enable or disable (format: +feature or -feature)
--versionPrint the version and exit
--help, -hDisplay help information and exit
--dry-runValidate configuration and exit without starting the collector
--logs-levelSet the logging level (debug, info, warn, error)
--configserverStart in configuration server mode for remote configuration management

Examples

Start the collector with a configuration file located at config.yaml

otelcol --config=config.yaml

Start the collector with debug logging enabled to troubleshoot issues

otelcol --config=config.yaml --logs-level=debug

Validate the configuration file without actually starting the collector service

otelcol --dry-run --config=config.yaml

Start the collector and override a specific configuration value for the OTLP receiver endpoint

otelcol --config=config.yaml --set=receivers.otlp.protocols.grpc.endpoint=0.0.0.0:4317

Display the installed version of the OpenTelemetry Collector

otelcol --version

Start the collector with a specific feature gate enabled for Prometheus translation

otelcol --config=config.yaml --feature-gates=+pkg.translator.prometheus.NormalizeName

Related commands