gaoxingliang opened a new issue, #8647:
URL: https://github.com/apache/apisix/issues/8647

   ### Current Behavior
   
   The plugin eleasticsearch-logger is not working with **elasticseachr-8.x** 
and **apisix - 3.0.0**
   and in apisix it has below error log:
   ```
   2023/01/10 07:51:51 [error] 48#48: *231989 [lua] batch-processor.lua:95: 
Batch Processor[elasticsearch-logger] failed to process entries: elasticsearch 
server returned status: 400,
    body: 
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata
 line [1] contains an unknown parameter 
[_type]"}],"type":"illegal_argument_exception",
   "reason":"Action/metadata line [1] contains an unknown parameter 
[_type]"},"status":400}, context: ngx.timer, client: , server: 0.0.0.0:9080
   
   ```
   the plugin conf is referenced to the doc url:
   https://apisix.apache.org/docs/apisix/plugins/elasticsearch-logger/
   and my conf is:
   ```
   {
     "auth": {
       "password": "changeme",
       "username": "elastic"
     },
     "batch_max_size": 1,
     "buffer_duration": 60,
     "disable": false,
     "endpoint_addr": "http://xxxx:9200";,
     "field": {
       "index": "services",
       "type": "collector"
     },
     "inactive_timeout": 5,
     "max_retry_count": 10,
     "name": "elasticsearch-logger",
     "retry_delay": 1,
     "ssl_verify": false,
     "timeout": 60
   }
   ```
   
   I also tried with es 6.0 and same conf as above.
   it shows error:
   ```
   
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation
 Failed: 1: an id must be provided if version type or value are 
set;"}],"type":"action_request_validation_exception","reason":"Validation 
Failed: 1: an id must be provided if version type or value are 
set;"},"status":400}, context: ngx.timer
   ```
   
   maybe this link will be helpful(it's for fluentd 
https://github.com/fluent/fluentd-kubernetes-daemonset/issues/1310 )
   
   ### Expected Behavior
   
   The elasticsearch logger plugin should work with es 8.x version.
   
   ### Error Logs
   
   See above.
   
   ### Steps to Reproduce
   
   1. create a elk cluster using 
https://github.com/deviantony/docker-elk#bringing-up-the-stack
   2. add the elasticsearch logger plugin 
   3. check the apisix logs.
   
   ### Environment
   
   - APISIX version 3.0.0
   - Operating system: centos7
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to