Add internal telemetry to an OTel Collector monitored by Fleet
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:
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: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:
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:
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.