You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
Please describe the current behavior?
When starting with an ES v7 server which doesn't have any serilog template configure, the sink tries to create the template, this fails with the following exception:
2023-03-08T10:12:49.7376289Z Failed to create the template. Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: PUT /_template/serilog-events-template?include_type_name=true. ServerError: Type: illegal_argument_exception Reason: "Malformed [mappings] section for type [dynamic_templates], should include an inner object describing the mapping"
at Elasticsearch.Net.Transport`1.HandleElasticsearchClientException(RequestData data, Exception clientException, IElasticsearchResponse response)
at Elasticsearch.Net.Transport`1.FinalizeResponse[TResponse](RequestData requestData, IRequestPipeline pipeline, List`1 seenExceptions, TResponse response)
at Elasticsearch.Net.Transport`1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
at Elasticsearch.Net.ElasticLowLevelClient.DoRequest[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
at Elasticsearch.Net.NamespacedClientProxy.DoRequest[TResponse](HttpMethod post, String url, PostData body, IRequestParameters params)
at Elasticsearch.Net.Specification.IndicesApi.LowLevelIndicesNamespace.PutTemplateForAll[TResponse](String name, PostData body, PutIndexTemplateRequestParameters requestParameters)
at Serilog.Sinks.Elasticsearch.ElasticsearchSinkState.RegisterTemplateIfNeeded() in C:\Users\ag\workspaces\oss\serilog-sinks-elasticsearch\src\Serilog.Sinks.Elasticsearch\Sinks\ElasticSearch\ElasticsearchSinkState.cs:line 177
Please describe the expected behavior?
Template creation should succeed without exceptions.
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
Running the sample project with dotnet run, changing nothing other than the ConnectionStrings:elasticsearch parameter in appsettings.json against a local docker container running the sebp/elk:7.17.5 docker image.
Make sure you have the default serilog-events-template template deleted as if you've previously used 8.4.1 of this sink the template will already be there and won't be recreated.
The text was updated successfully, but these errors were encountered:
@AlexGoris-KasparSolutions What configuration do you use for the sink in your .NET project when this error happens?
As described, I started from the sample project of this repo, only configured the ConnectionStrings:elasticsearch to point at my local elk stack (running sebp/elk:7.17.5) and started it with dotnet run
@AlexGoris-KasparSolutions Thank you for the details. I've added few comments to your pull request: #519 (review), if it's possible to round it up properly.
Does this issue relate to a new feature or an existing bug?
What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
9.0.0
What is the target framework and operating system? See target frameworks & net standard matrix.
Please describe the current behavior?
When starting with an ES v7 server which doesn't have any serilog template configure, the sink tries to create the template, this fails with the following exception:
Please describe the expected behavior?
Template creation should succeed without exceptions.
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
Running the sample project with
dotnet run
, changing nothing other than theConnectionStrings:elasticsearch
parameter inappsettings.json
against a local docker container running the sebp/elk:7.17.5 docker image.Make sure you have the default
serilog-events-template
template deleted as if you've previously used 8.4.1 of this sink the template will already be there and won't be recreated.The text was updated successfully, but these errors were encountered: