Currently we have implemented the plugin framework in FE.
This CL make the original audit log logic pluggable.
The following classes are mainly implemented:
1. AuditPlugin
The interface of audit plugin
2. AuditEvent
An AuditEvent contains all information about an audit event, such as a query, or a connection.
3. AuditEventProcessor
Audit event processor receive all audit events and deliver them to all installed audit plugins.
This CL implements two audit module plugins:
1. The builtin plugin `AuditLogBuilder`, which act same as the previous logic, to save the
audit log to the `fe.audit.log`
2. An optional plugin `AuditLoader`, which will periodically inserts the audit log into a Doris table
specified by the user. In this way, users can conveniently use SQL to query and analyze this
audit log table.
Some documents are added:
1. HELP docs of install/uninstall/show plugin.
2. Rename the `README.md` in `fe_plugins/` dir to `plugin-development-manual.md` and move
it to the `docs/` dir
3. `audit-plugin.md` to introduce the usage of `AuditLoader` plugin.
ISSUE: #3226
1.5 KiB
1.5 KiB
INSTALL PLUGIN
description
该语句用于安装一个插件。
语法
INSTALL PLUGIN FROM [source]
source 支持三种类型:
1. 指向一个 zip 文件的绝对路径。
2. 指向一个插件目录的绝对路径。
3. 指向一个 http 或 https 协议的 zip 文件下载路径
example
1. 安装一个本地 zip 文件插件:
INSTALL PLUGIN FROM "/home/users/seaven/auditdemo.zip";
2. 安装一个本地目录中的插件:
INSTALL PLUGIN FROM "/home/users/seaven/auditdemo/";
2. 下载并安装一个插件:
INSTALL PLUGIN FROM "http://mywebsite.com/plugin.zip";
keyword
INSTALL,PLUGIN