Elasticsearch (Legacy)
Description
The Elasticsearch (Legacy) Destination configures the Elasticsearch exporter to send telemetry data (logs, metric, traces) to Elastic for ingestion. If your Elastic deployment has the APM Server Integration, using the Elasticsearch (OTLP) Destination is recommended as described below.
Supported Types
Metrics | Logs | Traces |
---|---|---|
✓ | ✓ |
Elasticsearch Exporter vs OTLP Exporter
note
"When using the OpenTelemetry Collector, you should always prefer sending data via the OTLP exporter to an Elastic APM Server. Other methods, like using the elasticsearch exporter to send data directly to Elasticsearch will send data to the Elastic Stack, but will bypass all of the validation and data processing that the APM Server performs. In addition, your data will not be viewable in the Kibana Observability apps if you use the elasticsearch exporter."
Configuration Table
Parameter | Type | Default | Description |
---|---|---|---|
telemetry_types | telemetrySelector | Logs, Traces | Specifies which types of telemetry to export to Elasticsearch. |
enable_elastic_cloud | bool | false | Whether or not to enable support for Elastic Cloud. |
endpoints | strings | List of Elasticsearch URLs. e.g https://elastic.corp.net:9200 . | |
cloudid | string | The ID of the Elastic Cloud Cluster to publish events to. The cloudid can be used instead of endpoints. | |
logs_index | string | logs-generic-default | The index or datastream name to publish logs to. |
traces_index | string | traces-generic-default | The index or datastream name to publish traces to. |
pipeline | string | Optional Ingest Node pipeline ID used for processing documents published by the exporter. | |
enable_auth | bool | false | Whether or not to enable authentication. |
auth_type | enum | basic | Authentication Type to use. Options include "basic" and "apikey". |
user | string | Username used for HTTP Basic Authentication. | |
password | string | Password used for HTTP Basic Authentication. | |
api_key | string | Authorization API Key. | |
configure_tls | bool | false | Configure advanced TLS settings. |
insecure_skip_verify | bool | false | Enable to skip TLS certificate verification. |
ca_file | string | Certificate authority used to validate the database server's TLS certificate. | |
mutual_tls | bool | false | Whether or not to use mutual TLS authentication. |
cert_file | string | A TLS certificate used for client authentication if mutual TLS is enabled. | |
key_file | string | A TLS private key used for client authentication if mutual TLS is enabled. | |
retry_on_failure_enabled | bool | true | Attempt to resend telemetry data that has failed to be transmitted to the destination. |
num_workers | int | 0 | The number of workers publishing bulk requests concurrently. If 0, it defaults to the number of CPU cores. |
Supported Retry and Queuing Settings
This destination supports the following retry and queuing settings:
Sending Queue | Persistent Queue | Retry on Failure |
---|---|---|
✓ | ✓ | * |
* This destination only partially supports Retry on Failure; See the above configuration table for specific configuration for this destination type.
Example Configuration
Web Interface