OpenTelemetry Collector
This configuration scrapes Prometheus metrics and delivers them to the DDOSCOM Eyenode gateway over OTLP/HTTP with OAuth 2.0.
Before you start
Section titled “Before you start”Use a distribution that includes the oauth2client extension, such as OpenTelemetry Collector Contrib. Define OTEL_GATEWAY_ENDPOINT, OTEL_GATEWAY_OAUTH_TOKEN_URL, OTEL_GATEWAY_OAUTH_CLIENT_ID, and OTEL_GATEWAY_OAUTH_CLIENT_SECRET in the process environment. Get the secret from Secrets in the Eyenode Dashboard, then see the get-started guide for the remaining values and secure handling.
Configuration
Section titled “Configuration”Save this file as otel-collector-config.yaml. Replace node_exporter:9100 with your environment’s Prometheus endpoint if needed.
receivers: otlp: protocols: grpc: http:
prometheus: config: scrape_configs: - job_name: node static_configs: - targets: ['node_exporter:9100']
extensions: oauth2client: client_id: ${env:OTEL_GATEWAY_OAUTH_CLIENT_ID} client_secret: ${env:OTEL_GATEWAY_OAUTH_CLIENT_SECRET} token_url: ${env:OTEL_GATEWAY_OAUTH_TOKEN_URL} scopes: ["openid"] timeout: 10s expiry_buffer: 60s
exporters: otlphttp: endpoint: ${env:OTEL_GATEWAY_ENDPOINT} auth: authenticator: oauth2client
debug: verbosity: normal
processors: batch:
service: extensions: - oauth2client pipelines: metrics: receivers: [otlp, prometheus] processors: [batch] exporters: [debug, otlphttp]Start and validate
Section titled “Start and validate”Start the Collector with the variables available in its environment. First confirm that the debug exporter prints metrics, then verify otlphttp activity and that Eyenode receives metrics in the correct tenant and time range.
[!NOTE] This configuration enables metrics only. Add separate pipelines before sending logs or traces.
If the pipeline does not deliver signals, follow gateway troubleshooting.
Additional references
Section titled “Additional references”- OpenTelemetry Collector configuration: official reference for extending receivers, processors, exporters, and pipelines.