LinkMesh

Search docs, blog and changelog

ENDE

Send logs and traces to Elasticsearch

The elasticsearch exporter writes OpenTelemetry logs and traces straight into Elasticsearch data streams. It uses the OpenTelemetry-native mapping by default, so the OpenTelemetry field names are kept; the API key comes from the environment.

Signals
LogsTraces
Source
OTLP
Components
otlpbatchmemory_limiterelasticsearch
Destination
Elasticsearch

OpenTelemetry Collector

OpenTelemetry Collector YAML
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25
  batch:
    timeout: 5s

exporters:
  elasticsearch:
    endpoints: [https://elasticsearch.example.internal:9200]
    api_key: ${env:ELASTICSEARCH_API_KEY}
    logs_index: logs-otel-default
    traces_index: traces-otel-default
    sending_queue:
      enabled: true
      queue_size: 5000
    retry:
      enabled: true
      initial_interval: 5s
      max_interval: 30s

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [elasticsearch]
    traces:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [elasticsearch]

LinkMesh

LinkMesh has no built-in template for this job. Add it as a custom destination in raw mode, with elasticsearch as the component type and this body - the same lines as under elasticsearch in the collector config:

Custom destination body (elasticsearch)
endpoints: [https://elasticsearch.example.internal:9200]
api_key: ${env:ELASTICSEARCH_API_KEY}
logs_index: logs-otel-default
traces_index: traces-otel-default
sending_queue:
  enabled: true
  queue_size: 5000
retry:
  enabled: true
  initial_interval: 5s
  max_interval: 30s

How custom components are validated and rolled out: create a custom destination.

Download config.yamlValidated with otelcol-contrib v0.165.0 on 2026-12-06

Complete config files, each checked with the collector's own validate command (otelcol-contrib v0.165.0).

The gotcha

This exporter's settings have changed across recent collector versions. In our test otelcol-contrib 0.165.0 refused the generic retry_on_failure block and mapping.mode with "invalid keys: retry_on_failure; 'mapping' has invalid keys: mode". The exporter's own retry block, as here, loads on 0.153.0 and 0.165.0. Validate against the exact collector version you run before you roll this out.

Manage this across a fleet

LinkMesh manages collector configuration across a fleet from one self-hosted control plane, so a change like this is made once rather than host by host. The first 25 Collectors are free after a no-card registration in the OpenSight Customer Portal (5 without one).

Doing this in LinkMesh: Destinations