Skip to content

Commit

Permalink
[Docs](docs) Modify plugin documents (apache#17161)
Browse files Browse the repository at this point in the history
* modify plugin docs

* add qe_slow_log_ms description

* add version describtion
  • Loading branch information
yongjinhou authored Feb 27, 2023
1 parent 0db5880 commit c807596
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/en/docs/ecosystem/audit-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ The configuration of the auditloader plugin is located in `$ {DORIS}/fe_plugins/

Open `plugin.conf` for configuration. See the comments of the configuration items.

<version since="1.2.0"></version>
Audit log plugin supports importing slow query logs into a separate slow table since version 1.2, `doris_slow_log_tbl__`, which is closed by default. In the plugin configuration file, add `enable_slow_log = true` to enable the function. And you could modify 'qe_slow_log_ms' item in FE configuration file to change slow query threshold.

### Compile

After executing `sh build_plugin.sh` in the Doris code directory, you will get the `auditloader.zip` file in the `fe_plugins/output` directory.
Expand All @@ -52,7 +55,7 @@ You can place this file on an http download server or copy(or unzip) it to the s

### Installation

After deployment is complete, and before installing the plugin, you need to create the audit database and tables previously specified in `plugin.conf`. The database and table creation statement is as follows:
After deployment is complete, and before installing the plugin, you need to create the audit database and tables previously specified in `plugin.conf`. If `enable_slow_log` is set true, the slow table `doris_slow_log_tbl__` needs to be created, with the same schema as `doris_audit_log_tbl__`. The database and table creation statement is as follows:

```
create database doris_audit_db__;
Expand Down
5 changes: 4 additions & 1 deletion docs/zh-CN/docs/ecosystem/audit-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ auditloader plugin的配置位于`${DORIS}/fe_plugins/auditloader/src/main/assem

打开 `plugin.conf` 进行配置。配置项说明参见注释。

<version since="1.2.0"></version>
从 1.2 版本开始,审计日志插件支持将慢查询日志导入到单独的慢表 `doris_slow_log_tbl__` 中,Doris 中默认关闭,在审计日志的配置文件中,增加 `enable_slow_log = true`,开启该功能。并且可以在 FE 配置文件中修改 `qe_slow_log_ms` 项来修改慢查询阈值。

### 编译

在 Doris 代码目录下执行 `sh build_plugin.sh` 后,会在 `fe_plugins/output` 目录下得到 `auditloader.zip` 文件。
Expand All @@ -52,7 +55,7 @@ auditloader plugin的配置位于`${DORIS}/fe_plugins/auditloader/src/main/assem

### 安装

部署完成后,安装插件前,需要创建之前在 `plugin.conf` 中指定的审计数据库和表。其中建库与建表语句如下:
部署完成后,安装插件前,需要创建之前在 `plugin.conf` 中指定的审计数据库和表。若开启了慢查询日志导入功能,需要创建慢表 `doris_slow_log_tbl__`,其表结构与 `doris_audit_log_tbl__` 一致。其中建库与建表语句如下:

```
create database doris_audit_db__;
Expand Down

0 comments on commit c807596

Please sign in to comment.