.NET model of ECS
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
The Elastic.CommonSchema project contains a full C# representation of the Elastic Common Schema (ECS). The intention of this library is to form a reliable and correct basis for integrating into Elasticsearch, using both Microsoft .NET and ECS.
These types can be used either as-is or in conjunction with the Official .NET clients for Elasticsearch. The types are annotated with the corresponding DataMember attributes, enabling out-of-the-box serialization support with the Elasticsearch.net clients.
Add a reference to the Elastic.CommonSchema package:
<PackageReference Include="Elastic.CommonSchema" Version="8.6.0" />
Use Elastic.Ingest.Elasticsearch.CommonSchema to easily persist ECS documents to Elasticsearch or Elastic Cloud.
The version of the Elastic.CommonSchema package matches the published ECS version, with the same corresponding branch names:
- Nested Schema (The C# types are generated from this YAML file): https://github.com/elastic/ecs/blob/v1.4.0/generated/ecs/ecs_nested.yml
- .NET types: https://github.com/elastic/ecs-dotnet/tree/v1.4.0
The version numbers of the NuGet package must match the exact version of ECS used within Elasticsearch. Attempting to use mismatched versions, for example a NuGet package with version 1.2.0 against an Elasticsearch index configured to use an ECS template with version 1.1.0, will result in indexing and data problems.