Add internal telemetry to an OTel Collector monitored by Fleet
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Preview
Preview
Stack
Preview
9.4+
Preview since 9.4
Monitor the health, resource usage, and pipeline performance of an OpenTelemetry (OTel) Collector in Kibana by sending its own metrics, logs, and traces to Elasticsearch. The collector emits this telemetry to its own OTLP (OpenTelemetry Protocol) receiver, which forwards it through a pipeline to Elasticsearch.
If you added your collector using the Add collector flow, the generated configuration already includes internal telemetry.
You'll need:
- An OTel Collector with OpAMP extension support, already added in Fleet. For more information, refer to Add an OTel Collector in Fleet.
- Access to your OTel Collector's configuration file
- An Elasticsearch API key with
create_index,write, andauto_configureindex privileges onmetrics-*,logs-*, andtraces-*data streams, or an existing exporter you can reuse for internal telemetry
To add internal telemetry to an existing collector configuration, extend it with the following components:
Configure the OTLP receiver:
YAML receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318Configure an exporter that sends telemetry to your Elasticsearch backend. If your collector already exports telemetry, you can reuse the existing exporter and add the OTLP receiver to its pipelines. Otherwise, configure the
elasticsearch/otelexporter:YAML exporters: elasticsearch/otel: endpoints: [https://elasticsearch:9200] api_key: "<es-api-key>" mapping: mode: otel- Replace with your Elasticsearch endpoint.
- Replace with an Elasticsearch API key.
NoteOn Serverless Observability projects and Elastic Cloud Hosted deployments, you can replace the
elasticsearch/otelexporter with the Elastic Cloud Managed OTLP Endpoint, which accepts OTLP data directly and uses an APM-scoped API key. For more details, refer to Elastic Cloud Managed OTLP Endpoint (mOTLP).Set up the service pipelines:
YAML service: pipelines: metrics: receivers: [otlp] exporters: [elasticsearch/otel] logs: receivers: [otlp] exporters: [elasticsearch/otel] traces: receivers: [otlp] exporters: [elasticsearch/otel]Set up internal telemetry for the OTel Collector:
YAML service: telemetry: resource: service.instance.id: "<instance-uid>" metrics: level: detailed readers: - periodic: interval: 3000 exporter: otlp: protocol: grpc endpoint: http://localhost:4317 logs: processors: - batch: exporter: otlp: protocol: grpc endpoint: http://localhost:4317 traces: processors: - batch: exporter: otlp: protocol: grpc endpoint: http://localhost:4317- Replace with the UUID value provided in
extensions.opamp.instance_uid.
- Replace with the UUID value provided in
Save your configuration, then start or restart the OTel Collector.
When your collector is running, confirm that internal telemetry is reaching Elasticsearch:
- The first time the collector ingests data, Fleet automatically installs the OTel Collector internal telemetry dashboards in Kibana.
- In Kibana, go to Dashboards and search for OTel Collector internal telemetry.
- Open a dashboard and confirm that visualizations display your collector's metrics, logs, traces, resource usage, pipeline performance, and component health.