![]() |
VOOZH | about |
dotnet add package Elastic.Ingest.Elasticsearch.CommonSchema --version 9.0.0
NuGet\Install-Package Elastic.Ingest.Elasticsearch.CommonSchema -Version 9.0.0
<PackageReference Include="Elastic.Ingest.Elasticsearch.CommonSchema" Version="9.0.0" />
<PackageVersion Include="Elastic.Ingest.Elasticsearch.CommonSchema" Version="9.0.0" />Directory.Packages.props
<PackageReference Include="Elastic.Ingest.Elasticsearch.CommonSchema" />Project file
paket add Elastic.Ingest.Elasticsearch.CommonSchema --version 9.0.0
#r "nuget: Elastic.Ingest.Elasticsearch.CommonSchema, 9.0.0"
#:package Elastic.Ingest.Elasticsearch.CommonSchema@9.0.0
#addin nuget:?package=Elastic.Ingest.Elasticsearch.CommonSchema&version=9.0.0Install as a Cake Addin
#tool nuget:?package=Elastic.Ingest.Elasticsearch.CommonSchema&version=9.0.0Install as a Cake Tool
A specialization of Elastic.Ingest.Elasticsearch that offers two channel implementations that make it easy to write ECS formatted data and bootstrap the target datastreams/indices with ECS mappings and settings.
NOTE: To use version 9.0.0 of this package you need atleast version 8.15.0 of the Elastic Stack.
EcsDataStreamChannel<TEvent>A channel that specializes to writing data with a timestamp to Elasticsearch data streams.
A channel can be created to push data to the logs-dotnet-default data stream.
var dataStream = new DataStreamName("logs", "dotnet");
var bufferOptions = new BufferOptions { }
var options = new DataStreamChannelOptions<EcsDocument>(transport)
{
DataStream = dataStream,
BufferOptions = bufferOptions
};
var channel = new EcsDataStreamChannel<EcsDocument>(options);
NOTE: read more about Elastic's data stream naming convention here: https://www.elastic.co/blog/an-introduction-to-the-elastic-data-stream-naming-scheme
we can now push data to Elasticsearch using the EcsDataStreamChannel
var doc = new EcsDocument
{
Timestamp = DateTimeOffset.Now,
Message = "Hello World!",
}
channel.TryWrite(doc);
EcsIndexChannel<TEvent>A channel that specializes in writing catalog data to Elastic indices.
We can create an EcsIndexChannel<> to push EcsDocument (or subclassed) instances.
var options = new IndexChannelOptions<EcsDocument>(transport)
{
IndexFormat = "catalog-data-{0:yyyy.MM.dd}",
// BulkOperationIdLookup = c => null,
TimestampLookup = c => c.Timestamp,
};
var channel = new EcsIndexChannel<CatalogDocument>(options);
now we can push data using:
var doc = new CatalogDocument
{
Created = date,
Title = "Hello World!",
Id = "hello-world"
}
channel.TryWrite(doc);
This will push data to catalog-data-2023.01.1 because TimestampLookup yields Timestamp to IndexFormat.
IndexFormat can also simply be a fixed string to write to an Elasticsearch alias/index.
BulkOperationIdLookup determines if the document should be pushed to Elasticsearch using a create or index operation.
Optionally the target data stream or index can be bootstrapped using the following.
await channel.BootstrapElasticsearchAsync(BootstrapMethod.Failure, "7-days-default");
This will bootstrap:
*-settings component template for the datastream/indices that sets up ILM.If the index template already exists no further bootstrapping will occur.
Just like Elastic.Ingest.Elasticsearch the channel is aware that logs and metrics have default component templates and ensures the new index tempate references them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Elastic.Ingest.Elasticsearch.CommonSchema:
| Package | Downloads |
|---|---|
|
Elastic.Serilog.Sinks
Package Description |
|
|
Elastic.Extensions.Logging
Elasticsearch logger provider for Microsoft.Extensions.Logging. Writes direct to Elasticsearch using the Elastic Common Schema (ECS), with semantic logging of structured data from message and scope values, for use with the Elasticsearch-Logstash-Kibana (ELK) stack. The results can be viewed and queried in the Kibana console. |
|
|
Elastic.NLog.Targets
NLog Target that exports directly to Elastic Cloud or individual Elasticsearch nodes |
|
|
Elastic.CommonSchema.BenchmarkDotNetExporter
Exports BenchmarkDotNet benchmarks to Elasticsearch using Elastic Common Schema (ECS) format |
|
|
Elasticsearch.Extensions.Logging
Elasticsearch logger provider for Microsoft.Extensions.Logging. Writes direct to Elasticsearch using the Elastic Common Schema (ECS), with semantic logging of structured data from message and scope values, for use with the Elasticsearch-Logstash-Kibana (ELK) stack. The results can be viewed and queried in the Kibana console. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 1,850,089 | 8/13/2025 |
| 8.19.0 | 387,369 | 8/13/2025 |
| 8.18.2 | 545,201 | 6/27/2025 |
| 8.18.1 | 431,214 | 5/28/2025 |
| 8.18.0 | 50,828 | 5/22/2025 |
| 8.12.3 | 2,233,950 | 11/26/2024 |
| 8.12.2 | 529,475 | 10/22/2024 |
| 8.12.1 | 237,182 | 10/3/2024 |
| 8.12.0 | 97,788 | 9/26/2024 |
| 8.11.1 | 1,191,842 | 6/10/2024 |
| 8.11.0 | 367,788 | 4/10/2024 |
| 8.6.1 | 916,193 | 8/3/2023 |
| 8.6.0 | 169,297 | 5/9/2023 |
| 8.4.0-alpha4 | 26,762 | 3/28/2023 |
| 8.4.0-alpha3 | 584 | 3/15/2023 |
| 8.4.0-alpha2 | 928 | 3/1/2023 |
| 8.4.0-alpha1 | 1,049 | 2/20/2023 |