NLog.Targets.ElasticSearch: Error ElasticSearch Bulk item failed index result created type error

When switching from ELK 7.12.1 to ELK 8.5.3, there is an error when sending logs with NLog 5 (NLog Version 5.1.0, NLog.Targets.ElasticSearch Version 7.7.0)

Error ElasticSearch: Bulk item failed: index:dev-000005 result:created type: error:

Can it be related to the fact that ElasticSearch 8 does not have such a concept as _type which is expected to see in the NLog response?

The ElasticSearch messages were written correctly and without errors After analyzing the network traffic of the application we saw that like in the case of ELK 7 and ELK 8 the response code is 200 and the only difference is the absence of field _type in the response from ELK 8

If it is so, what can we do to fix it? traffic

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

I have the same issue where I have NLog.Targets.ElasticSearch version 7.7.0. My Nlog configuration does have documentType = "" set. I upgraded my NEST library to version 7.17.5 and added ELASTIC_CLIENT_APIVERSIONING=true so I am no longer getting the below error -

2023-09-05 13:33:16.4864 Error ElasticSearch: Server error: ServerError: 400Type: illegal_argument_exception Reason: "Action/metadata line [1] contains an unknown parameter [_type]

But I get this error now -

2023-09-05 13:43:15.4303 Error ElasticSearch: Bulk item failed: index:.ds-logs-myindex-2023.09.03-000143 result:created type: error: