2. Elastic Common Schema #
Common fields.
Why ECS #
ECS defines common field names: source.ip, host.name, http.response.status_code, log.level, event.category… When every source follows them, one query, dashboard or detection rule works across all data.
| Custom field | ECS field |
|---|---|
| clientip | source.ip |
| status | http.response.status_code |
| level | log.level |
| server | host.name |
| user | user.name |
filter {
mutate {
rename => {
"clientip" => "[source][ip]"
"status" => "[http][response][status_code]"
"level" => "[log][level]"
}
}
}ecs_compatibility mode #
Since version 8, Logstash plugins produce ECS-compatible fields by default (pipeline.ecs_compatibility: v8): the beats input, grok with ECS patterns, geoip… The disabled mode restores the old behaviour, useful to migrate legacy pipelines.
Good practice: Put your business fields outside ECS namespaces, under your own prefix (labels.*for simple keywords, ormyapp.*): they will not clash with a future ECS version.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Course Glossary
Logstash
An open-source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to...
Recommended Articles
Understanding the Elastic Common Schema (ECS)
As always in our consulting engagements, we recommend that companies harmonise and standardise: k...
Logstash: inputs and outputs
Written version of the video lessons: common inputs (beats, file, tcp/udp, http, kafka, jdbc) and...
Elastic Security: SIEM, detection rules and investigation
Use Elastic Security as a SIEM: ECS data sources, detection rule types (query, EQL, ES|QL, thresh...
Beats: going further (security, performance, Elastic Agent and migrating to Alloy)
Industrialize Filebeat, Metricbeat and the other Beats: secure outputs, processors, modules, tuni...
Logstash: role, pipeline concept and installation
Written version of the video lessons: what Logstash is for, how a pipeline works (inputs, filters...
Logstash: filters, grok and dissect
Written version of the video lessons: essential filters (mutate, date, json, kv, drop), the grok ...
Logstash in production: persistent queues, DLQ and multiple pipelines
Make Logstash reliable in production: persistent queue, dead letter queue, multiple pipelines and...
Logstash: enrich, test, monitor and deploy on Kubernetes
Enrich with translate, geoip and elasticsearch, consume Kafka, test pipelines, monitor Logstash a...
Machine learning in Elastic: anomaly detection and AIOps
Automatically detect abnormal behaviour: anomaly detection jobs, datafeeds, detectors, influencer...