Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Autogreate template failes #327

Open
@ghost

Description

Trying to use the elastic sink. It works for a short time, then failes...

This is my setup :

return m_LoggerConfiguration.WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(TmpURL))
{
AutoRegisterTemplate
= true ,

            AutoRegisterTemplateVersion
                = AutoRegisterTemplateVersion.ESv6,

            CustomFormatter
                = new ElasticsearchJsonFormatter(false , null , true , null , null , true , false, false) ,
        });

This is the error 👍
2020-04-24T13:34:11.8038088Z Failed to create the template. Elasticsearch.Net.ElasticsearchClientException: Den eksterne serveren returnerte feilen (400) Ugyldig forespørsel.. Call: Status code 400 from: PUT /_template/serilog-events-template ---> System.Net.WebException: Den eksterne serveren returnerte feilen (400) Ugyldig forespørsel.
ved System.Net.HttpWebRequest.GetResponse()
ved Elasticsearch.Net.HttpWebRequestConnection.Request[TResponse](RequestData requestData)
--- Slutten på sporingen av intern unntaksstakk ---
ved Elasticsearch.Net.Transport1.HandleElasticsearchClientException(RequestData data, Exception clientException, IElasticsearchResponse response) ved Elasticsearch.Net.Transport1.FinalizeResponse[TResponse](RequestData requestData, IRequestPipeline pipeline, List1 seenExceptions, TResponse response) ved Elasticsearch.Net.Transport1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
ved Elasticsearch.Net.ElasticLowLevelClient.DoRequest[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
ved Elasticsearch.Net.NamespacedClientProxy.DoRequest[TResponse](HttpMethod post, String url, PostData body, IRequestParameters params)
ved Elasticsearch.Net.Specification.IndicesApi.LowLevelIndicesNamespace.PutTemplateForAll[TResponse](String name, PostData body, PutIndexTemplateRequestParameters requestParameters)
ved Serilog.Sinks.Elasticsearch.ElasticsearchSinkState.RegisterTemplateIfNeeded()

Any idea what's going on ?

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions