serilog-sinks-elasticsearch
serilog-sinks-elasticsearch copied to clipboard
Adding an index template to elastic serilog sink
A few questions before you begin:
Is this an issue related to the Serilog core project or one of the sinks or community projects.
This issue list is intended for Serilog Elasticsearch Sink issues. If this issue relates to another sink or to the code project, please log on the related repository. Please use Gitter chat and Stack Overflow for discussions and questions.
Does this issue relate to a new feature or an existing bug?
- [x] Bug
- [ ] New Feature
What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
What is the target framework and operating system? See target frameworks & net standard matrix.
- [ ] netCore 2.0
- [ ] netCore 1.0
- [ ] 4.7
- [ ] 4.6.x
- [ ] 4.5.x
- [x] .NetCore 3.1
Please describe the current behavior? If index template is created on kibana, indices created, dont have any docs or data, if templete is set though "templateCustomSettings":{ "index.lifecycle.name": "abc-policy"} then those settings are not observed.
Please describe the expected behavior? Adding index template to indices created through serilog elastic sink in order to attach index policy that deletes old logs
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem follow steps outlined above
I observed a similar behaviour and monitored the serilog failures with an failover sink: there was a mapping mismatch within elasticsearch, expected field _doc but got logevent.
So maybe you also have to check your mappings in your Indextemplates