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
totrue
- set
RegisterTemplateFailure
toIndexAnyway
You can configure the sink like so:
var loggerConfig = new LoggerConfiguration() .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(...) ){ // ... DetectElasticsearchVersion = true, RegisterTemplateFailure = RegisterTemplateFailure.IndexAnyway });