Free plan available. Set up in minutes with the collectors you already use. Start free
Logthread

Guide

Move from Elasticsearch (ELK) to Logthread

This guide moves log shipping from an Elasticsearch or ELK stack (Elasticsearch, Logstash, Kibana, Beats) to Logthread without a gap. Your senders stay: Filebeat, Winlogbeat, Logstash, Fluent Bit and Vector already speak the Elasticsearch bulk API, and Logthread accepts it. You change one output block, run both for a while, compare the counts, then switch Elasticsearch off.

Only ingest is compatible. Searches, Kibana, index management and ingest pipelines do not run against Logthread: you search in Explore and parse with Logthread pipelines (step 4).

What maps to what#

Elasticsearch and KibanaIn Logthread
Beats, Logstash, Fluent Bit, Vector shipping to :9200The same senders, shipping to https://ingest.logthread.com:443 with an ingest key
Index or data streamThe resource field elasticsearch.index on every log
@timestamp, message, log.level, service.nameLog time, message, level and service
host.*, agent.*, cloud.*, container.*, kubernetes.*Resource fields (res.host.name and so on)
Ingest pipelines, Filebeat module parsingPipelines and parsing, with ready-made parsers for common software
Kibana Discover and KQL searchesExplore and its query language
Kibana dashboards and LensDashboards
Watcher and Kibana alerting rulesAlerts, on any search
ILM, retention and rolloverYour workspace's retention: nothing to manage
Elastic Agent and FleetKeep Beats, or move to the Logthread Agent
Elastic APMOpenTelemetry traces and metrics to the same endpoint (guide)

1. Create an ingest key#

In Developers → Keys → Ingest keys, create a key for the senders you are moving (one per environment is a good start). Or open Integrations → Moving from Elasticsearch, pick your sender and answer one question: it creates the key and shows the settings below with the key filled in.

2. Send to both#

Keep Elasticsearch as it is and add Logthread next to it, so you can compare.

Logstash can have several outputs: add a second elasticsearch block.

output {
  elasticsearch { hosts => ["https://your-cluster:9200"] }   # unchanged
  elasticsearch {
    hosts => ["https://ingest.logthread.com:443"]
    user => "logthread"
    password => "${LOGTHREAD_INGEST_KEY}"
  }
}

Fluent Bit and Vector can have several outputs too: add an es output or an elasticsearch sink next to the existing one (settings in Send data). In Vector, set request_retry_partial: true so only the documents that failed are resent.

Filebeat and Winlogbeat have one output. For the parallel run, either run a second Beat with the Logthread output on a few servers, or send the Beat to a Logstash that has both outputs. When you switch, replace the output:

output.elasticsearch:
  hosts: ["https://ingest.logthread.com:443"]
  api_key: "logthread:${LOGTHREAD_INGEST_KEY}"

Always write the port: Beats and Logstash use 9200 when the URL has none. Templates, lifecycle policies and data streams that the senders set up at start are acknowledged, so setup.template and setup.ilm settings can stay. Beats 9.x need output.elasticsearch.allow_older_versions: true (the default in 9.x) because Logthread answers as an 8.x server.

3. Compare the counts#

After a day, compare what each side received. In Logthread, per index and service:

* | stats count() by res.elasticsearch.index, service | sort count desc

and per level, for one index:

res.elasticsearch.index:logs-checkout-default | stats count() by severity

In Kibana, run the same counts over the same hour. They should match. A small difference usually means documents Logthread refused: each one is logged by the sender with its reason (400 per document). The usual reasons are update or delete actions (Logthread keeps logs as sent) and documents with more than 124 fields; flatten or drop the extra fields in the sender.

4. Move parsing, dashboards and alerts#

  • Parsing. Elasticsearch ingest pipelines (including the ones Filebeat modules install) do not run. Documents arrive with the fields the sender itself produced. What an ingest pipeline added, such as grok on message, is done by a Logthread pipeline: open Pipelines, pick a ready-made parser or write one, and check it on your own logs before turning it on.
  • Searches. Saved Discover searches become Explore searches. log.level: error and service.name: checkout in Kibana is severity:error service:checkout in Explore.
  • Dashboards and alerts. Rebuild the panels you use in Dashboards, and turn alert rules into Logthread alerts from a search (Create alert in Explore).

5. Switch Elasticsearch off#

When the counts have matched for a week and the dashboards and alerts you need exist in Logthread, remove the Elasticsearch output from the senders. Filebeat resumes from its registry and Logstash's file input from its sincedb, so nothing is sent twice or lost at the switch.

Limits and behaviour#

  • A batch is at most 5 MB after decompression (413 otherwise). Filebeat's default batch (1,600 events) and Fluent Bit's chunks fit, and Filebeat splits a batch that gets a 413. In Vector set batch.max_bytes: 4000000 and batch.max_events: 10000; in Logstash keep the default pipeline.batch.size (125 events).
  • Up to 50,000 actions per batch; a larger batch is refused whole (413). Filebeat (1,600), Logstash (125) and Fluent Bit chunks stay below it; in Vector set batch.max_events: 10000.
  • Gzip (compression_level in Beats, http_compression in Logstash, Compress gzip in Fluent Bit, compression: gzip in Vector) is accepted and saves bandwidth.
  • Each document's response is 201 when it is stored durably; nothing is acknowledged before that.
  • A refused document (400) is not resent: Filebeat logs it and drops it, Logstash sends it to its dead letter queue when that is on, and Fluent Bit 3.2 and Vector drop it and keep the rest of the batch (checked with each sender).

Troubleshooting#

You seeDo this
connection refused or a timeout to :9200Add :443 to the URL
401 / security_exceptionThe key is wrong or revoked. Beats and Logstash: api_key: "logthread:<key>", or user logthread and the key as the password
Filebeat: Elasticsearch is too oldBeats 9.x: set output.elasticsearch.allow_older_versions: true
Fields you parsed in Elasticsearch are missingThe ingest pipeline did that: add a Logthread pipeline (step 4)
Logs arrive as unknown_serviceSet service.name in the sender (the snippets do)
413Lower the batch size (see the limits)