RousselTMLEARNING

Observability

Understanding the Elastic Common Schema (ECS)

As always in our consulting engagements, we recommend that companies harmonise and standardise: keep the same software solutions, the same versions and so on across their whole estate. But that is not always possible. Companies therefore quite often end up with different solutions and different versions that have to coexist and also be analysed as meaningfully as possible. Everything is fine when you only need to analyse each one individually, but quite often you will need to analyse them together. For example, with increasingly sophisticated cyberattacks, you need to rely on SIEM-type solutions that help you identify suspicious behaviour by correlating data from different sources. This is where you will see the value of ECS: it lets you define and organise your data regardless of where it comes from.

Introduction #

Definition #

The Elastic Common Schema (ECS) is an open source specification that helps you structure your data. The standard is designed for Elasticsearch, but you can perfectly well use it in other contexts. For example, ECS has merged with OpenTelemetry's SemConv, which de facto makes Elasticsearch compatible with OpenTelemetry.

Why use ECS #

As you can see in this diagram, we are trying to retrieve the events related to a user whose IP is 10.42.42.42.

In the first block, without ECS, the query is fairly complex because there is no agreed standard for the name of the field holding our user's IP.

In the second block, with ECS, the query is much simpler because ECS was used to normalise the field holding the IP, whatever its source. And the standard goes well beyond the field name alone:
  • The data type
  • The allowed values
  • The hierarchy

When you collect data, the end goal is to set up alerts, build dashboards and so on. Without ECS, you generally have to modify them every time you add new data, whereas this is transparent when you work with ECS.

How it works #

What help is there to get started? #

Setting up, or at least introducing, ECS in a company can seem complicated. But the reality is quite different. Integrations in the Elastic Stack can natively send your data in ECS format.

What next? Logstash #

Many companies use Beats and/or Elastic Agent to send logs, metrics and so on directly to an Elasticsearch server/cluster in ECS mode. For data that does not come from these tools, you can use Logstash. During its enrichment phases, it can make your data compliant with the standard. In this scenario, you will probably need more configuration.

Testing #

You may need to test your configuration manually. This is the case, for example, when you use grok in Logstash. You can use these tools to check that your configurations are compliant:

Dev Tools #

For many versions now, the Dev Tools in Kibana have let you test Grok patterns.

Grok Constructor #

This tool is available at https://grokconstructor.appspot.com/. It lets you test grok patterns with ECS. Another, more popular tool is https://grokdebugger.com/.

Going further #

You can build your own fields based on the ECS standard if you cannot find them in the ECS reference. If you are working on standardised configurations that others could reuse, you can share them with the community through the community Slack channel.

2026 update: what has changed #

Recent changes worth knowing (checked in November 2026).

ECS and OpenTelemetry #

Elastic donated ECS to the OpenTelemetry project in 2023: both schemas are converging on the OpenTelemetry semantic conventions. In practice, a field such as http.response.status_code or service.name has the same name in both worlds, and Elastic ingests OTLP data natively (EDOT, Elastic's OpenTelemetry distribution).

  • New integrations: prefer OpenTelemetry names where they exist.
  • Existing data: ECS remains supported by Elastic Security and its detection rules.
  • Pipelines: ingest processors and Logstash (grok, dissect) are still used to normalize sources that do not send structured fields.

Related articles

Transforms and enrich: summarising and enriching data in Elasticsearch

Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest time with enric…

OpenTelemetry and Elasticsearch: compatibility and architecture

Send OpenTelemetry to Elasticsearch: Collector and elasticsearch exporter, managed OTLP endpoint, APM Server,…

Ingesting OpenTelemetry logs into Elasticsearch

Collect and structure logs with the OpenTelemetry Collector (filelog receiver, operators, transform processor…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!