serilog-sinks-elasticsearch icon indicating copy to clipboard operation
serilog-sinks-elasticsearch copied to clipboard

Kibana stopped to show log messages after updating Serilog.Sinks.ElasticSearch to 8.1.0

Open matteodav opened this issue 4 years ago • 8 comments

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 questons.

Does this issue relate to a new feature or an existing bug?

  • [ v] Bug
  • [ ] New Feature

What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package. 8.1.0

What is the target framework and operating system? See target frameworks & net standard matrix. -[v] netCore 3.1

  • [ ] netCore 2.0
  • [ ] netCore 1.0
  • [ ] 4.7
  • [ ] 4.6.x
  • [ ] 4.5.x

Please describe the current behavior? Using Serilog.Sinks.ElasticSearch version 8.1.0, Kibana doesn't show the application log messages. The message are available only on application console. Downgrading the Serilog.Sinks.ElasticSearch version to 8.0.1 kibana show messages correctly.

Please describe the expected behavior? kibana should show application log messages also with Serilog.Sinks.ElasticSearch version 8.1.0

matteodav avatar Jun 26 '20 15:06 matteodav

No data is arriving at ES, is that what you mean? Or specific data?

mivano avatar Jul 07 '20 21:07 mivano

When I upgraded to 8.1.0, Log message would fail to make it to Elasticsearch/Kibana. I could (sometimes) delete the indexes and messages would start showing up again, but eventually they would stop.

estoces avatar Jul 07 '20 21:07 estoces

Hmm I do see more reports of this. Will try to look into it.

mivano avatar Jul 07 '20 22:07 mivano

Having a similar issue. 8.0.0 - 8.1.0 will not log anything at all. 8.2.0 & 8.4.0 will only log the first log sent to the logger and skips everything that follows. Any guesses?

Edit: Changing my _logger from ILogger to Logger and calling _logger.Dispose(); seems to have fixed my issue.

RugerSR9 avatar Sep 22 '20 16:09 RugerSR9

If you try this in a console app and stop too soon, the buffer is not flushed yet. Explicitly disposing will help.

mivano avatar Sep 24 '20 09:09 mivano

Same here https://github.com/serilog/serilog-sinks-elasticsearch/issues/335

minhhut avatar Sep 30 '20 08:09 minhhut

With version 8.4.0, I get errors from Selflog now

2020-09-30T09:03:05.2113399Z Failed to store event with template 'Application started. Press Ctrl+C to shut down.' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '_', found: [doc]"} 2020-09-30T09:03:05.2120099Z Failed to store event with template 'Hosting environment: {envName}' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [doc]"} 2020-09-30T09:03:05.2120627Z Failed to store event with template 'Content root path: {contentRoot}' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [doc]"} 2020-09-30T09:03:07.2892637Z Failed to store event with template 'HTTP {RequestMethod} {RequestPath} responded {StatusCode} in {Elapsed:0.0000} ms' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [doc]"} 2020-09-30T09:03:07.2893233Z Failed to store event with template 'HTTP {RequestMethod} {RequestPath} responded {StatusCode} in {Elapsed:0.0000} ms' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [doc]"} 2020-09-30T09:03:07.2893372Z Failed to store event with template 'HTTP {RequestMethod} {RequestPath} responded {StatusCode} in {Elapsed:0.0000} ms' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [doc]"} 2020-09-30T09:03:11.3586369Z Failed to store event with template 'HTTP {RequestMethod} {RequestPath} responded {StatusCode} in {Elapsed:0.0000} ms' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [doc]"} 2020-09-30T09:03:19.4249549Z Failed to store event with template 'HTTP {RequestMethod} {RequestPath} responded {StatusCode} in {Elapsed:0.0000} ms' into Elasticsearch. Elasticsearch reports for index logstash-edec-2020-09 the following: {"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '', found: [_doc]"}

minhhut avatar Sep 30 '20 09:09 minhhut

One said I have to upgrade ES 6.0 to ES 6.x may solve the apiVersion mismatch problem, but our ES is shared environment so i stay with version 8.0.1.

minhhut avatar Sep 30 '20 09:09 minhhut