ccxhwmy commented on code in PR #7643:
URL: https://github.com/apache/apisix/pull/7643#discussion_r950358341


##########
docs/en/latest/plugins/elasticsearch-logger.md:
##########
@@ -0,0 +1,206 @@
+---
+title: elasticsearch-logger
+keywords:
+  - APISIX
+  - API Gateway
+  - Plugin
+  - Elasticsearch-logger
+description: This document contains information about the Apache APISIX 
elasticsearch-logger Plugin.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Description
+
+The `elasticsearch-logger` Plugin is used to forward logs to 
[Elasticsearch](https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-general-purpose.html)
 for analysis and storage.
+
+When the Plugin is enabled, APISIX will serialize the request context 
information to [Elasticsearch Bulk 
format](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk)
 and submit it to the batch queue. When the maximum batch size is exceeded, the 
data in the queue is pushed to Elasticsearch. See [batch 
processor](../batch-processor.md) for more details.
+
+## Attributes
+
+| Name          | Required | Default                     | Description         
                                         |
+| ------------- | -------- | --------------------------- | 
------------------------------------------------------------ |
+| endpoint_addr | True     |                             | Elasticsearch API   
                                         |
+| field         | True     |                             | Elasticsearch 
`field` configuration                          |
+| field.index   | True     |                             | Elasticsearch 
[_index 
field](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index-field.html#mapping-index-field)
 |
+| field.type    | False    | Elasticsearch default value | Elasticsearch 
[_type 
field](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/mapping-type-field.html#mapping-type-field)
 |
+| auth          | False    |                             | Elasticsearch 
[authentication](https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-up-authentication.html)
 configuration |
+| auth.username | False    |                             | Elasticsearch 
[authentication](https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-up-authentication.html)
 username |

Review Comment:
   If the Elasticserach configured `xpack.security.enabled: false`, then 
username & password are not needed.
   If `elasticserach-logger` set username & password required, are users 
confused in this place?



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