Skip to main content

What dfe-transform-elastic does

dfe-transform-elastic turns Beats and Elastic Agent events, and syslog from firewalls, switches and other devices, into the ECS output Elastic's ingest pipeline gives for the same integration. Field names, types and enrichment match, apart from the differences named below, so dashboards, rules and queries built for that output keep working. Where Elasticsearch's output is wrong, you get the correct value instead (compat-policy.md).

It is deliberately not a reverse-engineered copy of the Elasticsearch pipeline engine. Elastic runs each pipeline on an ingest node as a chain of generic processors, with Painless scripts and grok and regex doing most of the parsing, and every event pays that CPU cost. dfe-transform-elastic compiles each integration's pipeline into native Rust ahead of time. The output is the same or better, and the hot path pays only for the work each event needs.

Pick what each source pays for​

Each level costs more CPU than the one above it, and each source sits at whichever level it needs:

  • No transform: the source names none, and its events land as sent. Nothing is parsed, so this costs least.
  • One integration: the source names it, such as filebeat.cisco_asa.default, and every event runs that one compiled pipeline.
  • Agentless: one syslog stream carries many device types. A detector reads a marker off each line, runs the matching integration and stamps the source. A line no marker claims passes through unparsed (configuration.md).

How each part of an ingest pipeline runs​

In ElasticIn dfe-transform-elastic
Ingest processorsCompiled Rust per processor, in the pipeline's order. Every processor a shipped pipeline uses is covered (parsers.md)
GrokEach pattern is compiled once and reused. Whole-line patterns skip the regex for a native parser: 29 ns against 214 ns for an IPv4 address, 11 ns against 1,098 ns for a whole line (parsers.md)
Painless scriptsA script with a Rust equivalent runs as Rust. One without is skipped, so the fields it would set are missing. painless_handled_total and painless_unhandled_total count both (parsers.md)
Pipeline callsThe called pipeline is built into the caller, so there is no call per event
foreachA loop
ConditionsA native if. A condition with no Rust equivalent never runs the processor it guards
on_failureRuns as Elastic runs it, beside ignore_failure
GeoIPOne MMDB lookup with a bounded cache, on DB-IP Lite in place of MaxMind GeoLite2, so geo fields can differ from Elastic's
User agentCompiled regexes, with small differences from Elastic's parser
Community IDThe same flow hash

Elastic keeps the raw line in event.original beside the parsed fields. Here it is kept once:

  • An event tagged preserve_original_event, Elastic's own opt-in, keeps event.original.
  • An event that parsed into fields drops it, because the fields carry the content.
  • An event where nothing parsed gets the line back in message, counted on events_unparsed_original_restored_total.

What runs elsewhere​

Some of Elastic's work happens before or after the ingest pipeline, and in DFE it sits with another component:

ElasticIn DFE
Collection by a Beat or AgentThe Beat or Agent still collects. DFE reads what it sends
Syslog and CEF transport parsingdfe-receiver, or the Beat or Agent
Agent-side processors such as add_host_metadataRun on the source machine, so the fields arrive set
enrich processordfe-loader's enrichment columns
reroute and final_pipelineKafka topic routing
@custom pipelines and the inference processorNot run

o365 and panw need Filebeat's own processors upstream. Part of their parsing runs inside Filebeat, before the ingest pipeline (compat.md).