Serilog Elasticsearch logs not making it to the server (but buffering correctly) Serilog Elasticsearch logs not making it to the server (but buffering correctly) elasticsearch elasticsearch

Serilog Elasticsearch logs not making it to the server (but buffering correctly)


A frequent source for this error is a malformed (template) request that does not match your ES version (e.g. contains deprecated fields). You could try to

  • use a preview version of the nuget package
  • set DetectElasticsearchVersion to true
  • set RegisterTemplateFailure to IndexAnyway

You can configure the sink like so:

var loggerConfig = new LoggerConfiguration()    .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(...) ){        // ...        DetectElasticsearchVersion = true,        RegisterTemplateFailure = RegisterTemplateFailure.IndexAnyway     });