You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/17 01:15:50 UTC

[GitHub] [apisix] hf400159 opened a new pull request, #7708: docs: refactor loggers plugin doc (2)

hf400159 opened a new pull request, #7708:
URL: https://github.com/apache/apisix/pull/7708

   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   Fixes # (issue)
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7708: docs: refactor loggers plugin doc (2)

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7708:
URL: https://github.com/apache/apisix/pull/7708#discussion_r951043595


##########
docs/zh/latest/plugins/loggly.md:
##########
@@ -0,0 +1,166 @@
+---
+title: loggly
+keywords:
+  - APISIX
+  - API 网关
+  - Plugin
+  - SolarWinds Loggly
+description: API 网关 Apache APISIX loggly 插件可用于将日志转发到 SolarWinds Loggly 进行分析和存储。
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## 描述
+
+`loggly` 插件可用于将日志转发到 [SolarWinds Loggly](https://www.solarwinds.com/loggly) 进行分析和存储。
+
+当启用插件时,APISIX 会将请求上下文信息并序列化为 [Loggly Syslog](https://documentation.solarwinds.com/en/success_center/loggly/content/admin/streaming-syslog-without-using-files.htm?cshid=loggly_streaming-syslog-without-using-files) 的数据格式,即具有 [RFC5424](https://datatracker.ietf.org/doc/html/rfc5424) 兼容标头的 Syslog。
+
+## 属性
+
+| 名称                   | 类型          | 必选项 | 默认值 | 描述                                                                                                                                                                                                              |
+|------------------------|---------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------|
+| customer_token         | string        | 是      |         | 将日志发送到 Loggly 时使用的唯一标识符,以确保将日志发送到正确的组织帐户。                                                                                                       |
+| severity               | string (enum) | 否      | INFO    | Syslog 日志事件的严重性级别。 包括:`DEBUG`、`INFO`、`NOTICE`、`WARNING`、`ERR`、`CRIT`、`ALERT` 和 `EMEGR`。                                         |
+| severity_map           | object        | 否      | nil     | 一种将上游 HTTP 响应代码映射到 Syslog 中的方法。 `key-value`,其中 `key` 是 HTTP 响应代码,`value`是 Syslog 严重级别。例如`{"410": "CRIT"}`。                |
+| tags                   | array         | 否      |         | 元数据将包含在任何事件日志中,以帮助进行分段和过滤。                                                                                                        |
+| include_req_body       | boolean       | 否      | false   | 当设置为 `true` 时,包含请求体。**注意**:如果请求体无法完全存放在内存中,由于 NGINX 的限制,APISIX 无法将它记录下来。               |
+| include_resp_body      | boolean       | 否      | false   | 当设置为 `true` 时,包含响应体。                                            |
+| include_resp_body_expr | array         | 否      |         | 当 `include_resp_body` 属性设置为 `true` 时进行过滤响应体,并且只有当此处设置的表达式计算结果为 `true` 时,才会记录响应体。更多信息,请参考 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。 |
+
+该插件支持使用批处理器来聚合并批量处理条目(日志或数据)。这样可以避免插件频繁地提交数据,默认设置情况下批处理器会每 `5` 秒钟或队列中的数据达到 `1000` 条时提交数据,如需了解批处理器相关参数设置,请参考 [Batch-Processor](../batch-processor.md#配置)。
+
+如果要生成用户令牌,请在 Loggly 系统中的 `<your assigned subdomain>/loggly.com/tokens` 设置,或者在系统中单击 `Logs > Source setup > Customer tokens`。
+
+## 插件元数据设置
+
+您还可以通过插件元数据配置插件。详细配置如下:

Review Comment:
   ```suggestion
   你还可以通过插件元数据配置插件。详细配置如下:
   ```



##########
docs/zh/latest/plugins/splunk-hec-logging.md:
##########
@@ -23,32 +30,32 @@ title: splunk-hec-logging
 
 ## 描述
 
-`splunk-hec-logging` 插件用于将 `Apache APISIX` 的请求日志转发到 `Splunk HTTP 事件收集器(HEC)` 中进行分析和存储,启用该插件后 `Apache APISIX` 将在 `Log Phase` 获取请求上下文信息并序列化为 [Splunk Event Data 格式](https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector#Event_metadata) 后提交到批处理队列中,当触发批处理队列每批次最大处理容量或刷新缓冲区的最大时间时会将队列中的数据提交到 `Splunk HEC` 中。
+`splunk-hec-logging` 插件可用于将请求日志转发到 Splunk HTTP 事件收集器(HEC)中进行分析和存储。
 
-有关 `Apache APISIX` 的 `Batch-Processor` 的更多信息,请参考:
-[Batch-Processor](../batch-processor.md)
+启用该插件后 APISIX 将在 `Log Phase` 获取请求上下文信息并序列化为 [Splunk Event Data 格式](https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector#Event_metadata) 后提交到批处理队列中,当触发批处理队列每批次最大处理容量或刷新缓冲区的最大时间时会将队 列中的数据提交到 `Splunk HEC` 中。

Review Comment:
   ```suggestion
   启用该插件后,APISIX 将在 `Log Phase` 获取请求上下文信息,并将其序列化为 [Splunk Event Data 格式](https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector#Event_metadata) 后提交到批处理队列中,当触发批处理队列每批次最大处理容量或刷新缓冲区的最大时间时会将队列中的数据提交到 `Splunk HEC` 中。
   ```



##########
docs/zh/latest/plugins/loggly.md:
##########
@@ -0,0 +1,166 @@
+---
+title: loggly
+keywords:
+  - APISIX
+  - API 网关
+  - Plugin
+  - SolarWinds Loggly
+description: API 网关 Apache APISIX loggly 插件可用于将日志转发到 SolarWinds Loggly 进行分析和存储。
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## 描述
+
+`loggly` 插件可用于将日志转发到 [SolarWinds Loggly](https://www.solarwinds.com/loggly) 进行分析和存储。
+
+当启用插件时,APISIX 会将请求上下文信息并序列化为 [Loggly Syslog](https://documentation.solarwinds.com/en/success_center/loggly/content/admin/streaming-syslog-without-using-files.htm?cshid=loggly_streaming-syslog-without-using-files) 的数据格式,即具有 [RFC5424](https://datatracker.ietf.org/doc/html/rfc5424) 兼容标头的 Syslog。

Review Comment:
   ```suggestion
   当启用插件时,APISIX 会请求上下文信息,并将其序列化为 [Loggly Syslog](https://documentation.solarwinds.com/en/success_center/loggly/content/admin/streaming-syslog-without-using-files.htm?cshid=loggly_streaming-syslog-without-using-files) 的数据格式,即具有 [RFC5424](https://datatracker.ietf.org/doc/html/rfc5424) 兼容标头的 Syslog。
   ```



##########
docs/zh/latest/plugins/google-cloud-logging.md:
##########
@@ -114,25 +118,27 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
 
 ## 测试插件
 
-* 向配置 `google-cloud-logging` 插件的路由发送请求
+你可以通过以下命令向 APISIX 发出请求:
 
 ```shell
-$ curl -i http://127.0.0.1:9080/hello
+curl -i http://127.0.0.1:9080/hello
+```
+
+```
 HTTP/1.1 200 OK
 ...
 hello, world
 ```
 
-* 登录谷歌云日志服务,查看日志
-
-[Google Cloud Logging Service](https://console.cloud.google.com/logs/viewer)
+访问成功后,你可以登录[谷歌云日志服务](https://console.cloud.google.com/logs/viewer)查看相关日志。

Review Comment:
   The previous text was in English but suddenly changed to Chinese here. It is recommended to keep it unified.



##########
docs/zh/latest/plugins/splunk-hec-logging.md:
##########
@@ -23,32 +30,32 @@ title: splunk-hec-logging
 
 ## 描述
 
-`splunk-hec-logging` 插件用于将 `Apache APISIX` 的请求日志转发到 `Splunk HTTP 事件收集器(HEC)` 中进行分析和存储,启用该插件后 `Apache APISIX` 将在 `Log Phase` 获取请求上下文信息并序列化为 [Splunk Event Data 格式](https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector#Event_metadata) 后提交到批处理队列中,当触发批处理队列每批次最大处理容量或刷新缓冲区的最大时间时会将队列中的数据提交到 `Splunk HEC` 中。
+`splunk-hec-logging` 插件可用于将请求日志转发到 Splunk HTTP 事件收集器(HEC)中进行分析和存储。
 
-有关 `Apache APISIX` 的 `Batch-Processor` 的更多信息,请参考:
-[Batch-Processor](../batch-processor.md)
+启用该插件后 APISIX 将在 `Log Phase` 获取请求上下文信息并序列化为 [Splunk Event Data 格式](https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector#Event_metadata) 后提交到批处理队列中,当触发批处理队列每批次最大处理容量或刷新缓冲区的最大时间时会将队 列中的数据提交到 `Splunk HEC` 中。
 
 ## 属性
 
-| 名称                  | 是否必需 | 默认值                                                                                                                                                                                         | 描述                                                                                                                                                           |
-| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| endpoint                | 必选   |                                                                                                                                                                                                   | Splunk HEC 端点配置信息                                                                                                                                     |
-| endpoint.uri            | 必选   |                                                                                                                                                                                                   | Splunk HEC 事件收集 API                                                                                                                                     |
-| endpoint.token          | 必选   |                                                                                                                                                                                                   | Splunk HEC 身份令牌                                                                                                                                        |
-| endpoint.channel        | 可选   |                                                                                                                                                                                                   | Splunk HEC 发送渠道标识,参考:[About HTTP Event Collector Indexer Acknowledgment](https://docs.splunk.com/Documentation/Splunk/8.2.3/Data/AboutHECIDXAck)   |
-| endpoint.timeout        | 可选   | 10                                                                                                                                                                                                | Splunk HEC 数据提交超时时间(以秒为单位)|
-| ssl_verify              | 可选   | true                                                                                                                                                                                              | 启用 `SSL` 验证,参考:[OpenResty 文档](https://github.com/openresty/lua-nginx-module#tcpsocksslhandshake)                                                    |
+| 名称                | 必选项  | 默认值 | 描述                                                                                                                                                               |
+| ------------------  | ------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| endpoint            | 是     |        | Splunk HEC 端点配置信息。                                                                                                                                            |
+| endpoint.uri        | 是     |        | Splunk HEC 事件收集 API。                                                                                                                                            |
+| endpoint.token      | 是     |        | Splunk HEC 身份令牌。                                                                                                                                                |
+| endpoint.channel    | 否     |        | Splunk HEC 发送渠道标识,更多信息请参考 [About HTTP Event Collector Indexer Acknowledgment](https://docs.splunk.com/Documentation/Splunk/8.2.3/Data/AboutHECIDXAck)。 |
+| endpoint.timeout    | 否     | 10     | Splunk HEC 数据提交超时时间(以秒为单位)。                                                                                                                             |
+| ssl_verify          | 否     | true   | 当设置为 `true` 时,启用 `SSL` 验证。                                                                                                                                 |
 
-本插件支持使用批处理器来聚合并批量处理条目(日志/数据)。这样可以避免插件频繁地提交数据,默认设置情况下批处理器会每 `5` 秒钟或队列中的数据达到 `1000` 条时提交数据,如需了解或自定义批处理器相关参数设置,请参考 [Batch-Processor](../batch-processor.md#配置) 配置部分。
+本插件支持使用批处理器来聚合并批量处理条目(日志和数据)。这样可以避免该插件频繁地提交数据。默认情况下每 5 秒钟或队列中的数据达到 1000 条时,批处理器会自动提交数据,如需了解更多信息或自定义配置,请参考 [Batch-Processor](../batch-processor.md#配置)。

Review Comment:
   ```suggestion
   本插件支持使用批处理器来聚合并批量处理条目(日志和数据)。这样可以避免该插件频繁地提交数据。默认情况下每 `5` 秒钟或队列中的数据达到 `1000` 条时,批处理器会自动提交数据,如需了解更多信息或自定义配置,请参考 [Batch-Processor](../batch-processor.md#配置)。
   ```



##########
docs/zh/latest/plugins/google-cloud-logging.md:
##########
@@ -23,38 +30,34 @@ title: google-cloud-logging
 
 ## 描述
 
-`google-cloud-logging` 插件用于将 `Apache APISIX` 的请求日志发送到 [Google Cloud Logging Service](https://cloud.google.com/logging/)。
-
-该插件提供了将请求的日志数据以批处理队列的形式推送到谷歌云日志服务的功能。
-
-有关 `Apache APISIX` 的 `Batch-Processor` 的更多信息,请参考:
-[Batch-Processor](../batch-processor.md)
+`google-cloud-logging` 插件可用于将请求日志发送到 [Google Cloud Logging Service](https://cloud.google.com/logging/)。

Review Comment:
   ```suggestion
   `google-cloud-logging` 插件可用于将请求日志发送到 [Google Cloud Logging Service](https://cloud.google.com/logging/) 进行分析和存储。
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY merged pull request #7708: docs: refactor loggers plugin doc (2)

Posted by GitBox <gi...@apache.org>.
SylviaBABY merged PR #7708:
URL: https://github.com/apache/apisix/pull/7708


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org