You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1086409
Browse filesBrowse the repository at this point in the historyBrowse files
Unless required by applicable law or agreed to in writing,
20
20
software distributed under the License is distributed on an
21
21
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22
-
KIND, either express or implied. See the License for the
22
+
KIND, either express or implied. See the License for the
23
23
specific language governing permissions and limitations
24
24
under the License.
25
25
-->
@@ -34,30 +34,47 @@ This plugin can periodically import the FE audit log into the specified Doris cl
34
34
35
35
### FE Configuration
36
36
37
-
The audit log plug-in framework is disabled by default in Doris. You need to add `plugin_enable = true `to the FE configuration file to enable plugin framework.
37
+
The audit log plug-in framework is enabled by default in Doris and is controlled by the FE configuration `plugin_enable`
38
38
39
39
### AuditLoader Configuration
40
40
41
-
The configuration of the auditloader plugin is located in `$ {DORIS}/fe_plugins/auditloader/src/main/assembly/`.
41
+
1. Download the Audit Loader plugin
42
42
43
-
Open `plugin.conf` for configuration. See the comments of the configuration items.
43
+
The Audit Loader plug-in is provided by default in the Doris distribution. After downloading the Doris installation package through [DOWNLOAD](https://doris.apache.org/download), decompress it and enter the directory, you can find the auditloader.zip file in the extensionsaudit_loader subdirectory.
44
44
45
-
<versionsince="1.2.0"></version>
46
-
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.
45
+
2. Unzip the installation package
47
46
48
-
### Compile
47
+
```shell
48
+
unzip auditloader.zip
49
+
```
49
50
50
-
After executing `sh build_plugin.sh` in the Doris code directory, you will get the `auditloader.zip` file in the `fe_plugins/output` directory.
51
+
Unzip and generate the following files:
51
52
52
-
### Deployment
53
+
* auditloader.jar: plug-in code package.
54
+
* plugin.properties: plugin properties file.
55
+
* plugin.conf: plugin configuration file.
53
56
54
-
You can place this file on an http download server or copy(or unzip) it to the specified directory of all FEs. Here we use the latter.
57
+
3. Modify plugin.conf
55
58
56
-
### Installation
59
+
The following configurations are available for modification:
57
60
58
-
After deployment is complete, and before installing the plugin, you need to create the audit log 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:
61
+
* frontend_host_port: FE node IP address and HTTP port in the format <fe_ip>:<fe_http_port>. The default value is 127.0.0.1:8030.
62
+
* database: Audit log database name.
63
+
* audit_log_table: Audit log table name.
64
+
* slow_log_table: Slow query log table name.
65
+
* enable_slow_log: Whether to enable the slow query log import function. The default value is false.
66
+
* user: Cluster username. The user must have INSERT permission on the corresponding table.
67
+
* password: Cluster user password.
59
68
60
-
```
69
+
### 创建库表
70
+
71
+
In Doris, you need to create the library and table of the audit log. The table structure is as follows:
72
+
73
+
If you need to enable the slow query log import function, you need to create an additional slow table `doris_slow_log_tbl__`, whose table structure is consistent with `doris_audit_log_tbl__`.
74
+
75
+
Among them, the `dynamic_partition` attribute selects the number of days for audit log retention according to your own needs.
After that, connect to Doris and use the `INSTALL PLUGIN` command to complete the installation. After successful installation, you can see the installed plug-ins through `SHOW PLUGINS`, and the status is `INSTALLED`.
171
+
After successful installation, you can see the installed plug-ins through `SHOW PLUGINS`, and the status is `INSTALLED`.
143
172
144
-
Upon completion, the plug-in will continuously import audit date into this table at specified intervals.
173
+
After completion, the plugin will continuously insert audit logs into this table at specified intervals.
0 commit comments