This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 77765edd77c3 [doc](audit) add audit log faq (#533)
77765edd77c3 is described below

commit 77765edd77c3524ad5f3ec251bc4cdae58155cd3
Author: Mingyu Chen <morning...@163.com>
AuthorDate: Wed Apr 10 20:36:56 2024 +0800

    [doc](audit) add audit log faq (#533)
---
 docs/ecosystem/audit-plugin.md                     | 24 ++++++++++++++++++++++
 .../current/ecosystem/audit-plugin.md              | 24 ++++++++++++++++++++++
 .../version-2.1/ecosystem/audit-plugin.md          | 24 ++++++++++++++++++++++
 .../version-2.1/ecosystem/audit-plugin.md          | 24 ++++++++++++++++++++++
 4 files changed, 96 insertions(+)

diff --git a/docs/ecosystem/audit-plugin.md b/docs/ecosystem/audit-plugin.md
index 5b3f5d3be11e..e7cc0c2d5d21 100644
--- a/docs/ecosystem/audit-plugin.md
+++ b/docs/ecosystem/audit-plugin.md
@@ -217,3 +217,27 @@ Detailed command reference: 
[INSTALL-PLUGIN.md](../sql-manual/sql-reference/Data
 After successful installation, you can see the installed plug-ins through 
`SHOW PLUGINS`, and the status is `INSTALLED`.
 
 After completion, the plugin will continuously insert audit logs into this 
table at specified intervals.
+
+## FAQ
+
+1. There is no data in the audit log table, or no new data is imported after 
running for a period of time.
+
+     You can check by following these steps:
+
+     - Check whether the partition was created normally
+
+         The audit log table is a dynamic partition table, partitioned by day. 
By default, partitions for the next 3 days will be created and partitions for 
the past 30 days will be retained. Only after the partition is created 
correctly can the audit log be imported normally.
+
+         You can use `show dynamic partition tables from __internal_schema` to 
check the scheduling of dynamic partitions and troubleshoot according to the 
cause of the error. Possible reasons for the error include:
+
+         - The number of BE nodes is less than the required number of 
replicas: the audit log table has 3 replicas by default, so at least 3 BE nodes 
are required. Or modify the number of replicas through the `alter table` 
statement, such as:
+
+             `alter table __internal_schema.audit_log set 
("dynamic_partition.replication_num" = "2")`
+
+         - No suitable storage medium: You can view the `storage_medium` 
attribute through `show create table __internal_schema.audit_log`. If BE does 
not have a corresponding storage medium, the partition creation may fail.
+
+         - No suitable resource group: The audit log table defaults to the 
`default` resource group. You can use the `show backends` command to check 
whether the resource has sufficient node resources.
+
+     - Search for the word `AuditLoad` in Master FE's `fe.log` to see if there 
are related error logs
+
+         The audit log is imported into the table through the internal stream 
load operation. There may be problems with the import process. These problems 
will print error logs in `fe.log`.
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/audit-plugin.md 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/audit-plugin.md
index 6ea539033466..ef4c371a62cb 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/audit-plugin.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/audit-plugin.md
@@ -220,3 +220,27 @@ INSTALL PLUGIN FROM [source] [PROPERTIES ("key"="value", 
...)]
 安装成功后,可以通过 `SHOW PLUGINS` 看到已经安装的插件,并且状态为 `INSTALLED`。
 
 完成后,插件会不断的以指定的时间间隔将审计日志插入到这个表中。
+
+## FAQ
+
+1. 审计日志表中没有数据,或运行一段时间后,不再进入新的数据
+
+    可以通过以下步骤排查:
+
+    - 检查分区是否被正常创建
+
+        审计日志表是一张按天分区的动态分区表,默认会创建未来3天的分区,并保留历史30天的分区。只有分区被正确创建后,才能正常写入审计日志。
+
+        可以通过 `show dynamic partition tables from __internal_schema` 
查看动态分区的调度情况,并根据错误原因排查。可能得错误原因包括:
+
+        - 节点数小于所需副本数:审计日志表默认 3 副本,所以至少需要 3 台BE节点。或者通过 `alter table` 语句修改副本数,如:
+
+            `alter table __internal_schema.audit_log set 
("dynamic_partition.replication_num" = "2")`
+
+        - 没有合适的存储介质:可以通过 `show create table __internal_schema.audit_log` 查看 
`storage_medium` 属性,如果 BE 没有对应的存储介质,则分区可能创建失败。
+
+        - 没有合适的资源组:审计日志表默认在 default 资源组。可以通过 `show backends` 
命令查看该资源自是否有足够的节点资源。
+
+    - 在 Master FE 的 `fe.log` 中搜索 `AuditLoad` 字样,查看是否有相关错误日志
+
+        审计日志是通过内部的 stream load 操作导入到表中的,有可能是导入流程出现了问题,这些问题会在 `fe.log` 中打印错误日志。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/audit-plugin.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/audit-plugin.md
index 6ea539033466..ef4c371a62cb 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/audit-plugin.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/audit-plugin.md
@@ -220,3 +220,27 @@ INSTALL PLUGIN FROM [source] [PROPERTIES ("key"="value", 
...)]
 安装成功后,可以通过 `SHOW PLUGINS` 看到已经安装的插件,并且状态为 `INSTALLED`。
 
 完成后,插件会不断的以指定的时间间隔将审计日志插入到这个表中。
+
+## FAQ
+
+1. 审计日志表中没有数据,或运行一段时间后,不再进入新的数据
+
+    可以通过以下步骤排查:
+
+    - 检查分区是否被正常创建
+
+        审计日志表是一张按天分区的动态分区表,默认会创建未来3天的分区,并保留历史30天的分区。只有分区被正确创建后,才能正常写入审计日志。
+
+        可以通过 `show dynamic partition tables from __internal_schema` 
查看动态分区的调度情况,并根据错误原因排查。可能得错误原因包括:
+
+        - 节点数小于所需副本数:审计日志表默认 3 副本,所以至少需要 3 台BE节点。或者通过 `alter table` 语句修改副本数,如:
+
+            `alter table __internal_schema.audit_log set 
("dynamic_partition.replication_num" = "2")`
+
+        - 没有合适的存储介质:可以通过 `show create table __internal_schema.audit_log` 查看 
`storage_medium` 属性,如果 BE 没有对应的存储介质,则分区可能创建失败。
+
+        - 没有合适的资源组:审计日志表默认在 default 资源组。可以通过 `show backends` 
命令查看该资源自是否有足够的节点资源。
+
+    - 在 Master FE 的 `fe.log` 中搜索 `AuditLoad` 字样,查看是否有相关错误日志
+
+        审计日志是通过内部的 stream load 操作导入到表中的,有可能是导入流程出现了问题,这些问题会在 `fe.log` 中打印错误日志。
diff --git a/versioned_docs/version-2.1/ecosystem/audit-plugin.md 
b/versioned_docs/version-2.1/ecosystem/audit-plugin.md
index 5b3f5d3be11e..e7cc0c2d5d21 100644
--- a/versioned_docs/version-2.1/ecosystem/audit-plugin.md
+++ b/versioned_docs/version-2.1/ecosystem/audit-plugin.md
@@ -217,3 +217,27 @@ Detailed command reference: 
[INSTALL-PLUGIN.md](../sql-manual/sql-reference/Data
 After successful installation, you can see the installed plug-ins through 
`SHOW PLUGINS`, and the status is `INSTALLED`.
 
 After completion, the plugin will continuously insert audit logs into this 
table at specified intervals.
+
+## FAQ
+
+1. There is no data in the audit log table, or no new data is imported after 
running for a period of time.
+
+     You can check by following these steps:
+
+     - Check whether the partition was created normally
+
+         The audit log table is a dynamic partition table, partitioned by day. 
By default, partitions for the next 3 days will be created and partitions for 
the past 30 days will be retained. Only after the partition is created 
correctly can the audit log be imported normally.
+
+         You can use `show dynamic partition tables from __internal_schema` to 
check the scheduling of dynamic partitions and troubleshoot according to the 
cause of the error. Possible reasons for the error include:
+
+         - The number of BE nodes is less than the required number of 
replicas: the audit log table has 3 replicas by default, so at least 3 BE nodes 
are required. Or modify the number of replicas through the `alter table` 
statement, such as:
+
+             `alter table __internal_schema.audit_log set 
("dynamic_partition.replication_num" = "2")`
+
+         - No suitable storage medium: You can view the `storage_medium` 
attribute through `show create table __internal_schema.audit_log`. If BE does 
not have a corresponding storage medium, the partition creation may fail.
+
+         - No suitable resource group: The audit log table defaults to the 
`default` resource group. You can use the `show backends` command to check 
whether the resource has sufficient node resources.
+
+     - Search for the word `AuditLoad` in Master FE's `fe.log` to see if there 
are related error logs
+
+         The audit log is imported into the table through the internal stream 
load operation. There may be problems with the import process. These problems 
will print error logs in `fe.log`.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to