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
# The max interval of batch loaded, default is 60 seconds.
107
+
# The max interval of batch loaded, default is 60 seconds
105
108
max_batch_interval_sec=60
106
109
107
-
# the max stmt length to be loaded in audit table, default is 1048576.
110
+
# the max stmt length to be loaded in audit table, default is 1048576
108
111
max_stmt_length=1048576
109
112
110
-
# StarRocks FE host for loading the audit, default is 127.0.0.1:8030.
111
-
# this should be the host port for stream load.
113
+
# StarRocks FE host for loading the audit, default is 127.0.0.1:8030
114
+
# this should be the host port for stream load
112
115
frontend_host_port=127.0.0.1:8030
113
116
114
-
# If the response time of a query exceed this threshold, it will be recored in audit table as slow_query.
117
+
# If the response time of a query exceed this threshold, it will be recored in audit table as slow_query
115
118
qe_slow_log_ms=5000
116
119
117
-
# Database of the audit table.
120
+
# the capacity of audit queue, default is 1000
121
+
max_queue_size=1000
122
+
123
+
# Database of the audit table
118
124
database=starrocks_audit_db__
119
125
120
-
# Audit table name, to save the audit data.
126
+
# Audit table name, to save the audit data
121
127
table=starrocks_audit_tbl__
122
128
123
-
# StarRocks user. This user must have import permissions for the audit table.
129
+
# StarRocks user. This user must have import permissions for the audit table
124
130
user=root
125
131
126
-
# StarRocks user's password.
132
+
# StarRocks user's password
127
133
password=
128
134
135
+
# StarRocks password encryption key, with a length not exceeding 16 bytes
136
+
secret_key=
137
+
129
138
# Whether to generate sql digest for all queries
130
139
enable_compute_all_query_digest=false
140
+
141
+
# Filter conditions when importing audit information
142
+
filter=
131
143
```
132
144
133
145
**说明**:
134
-
1. 推荐使用参数 `frontend_host_port` 的默认配置,即 `127.0.0.1:8030` 。StarRocks 中各个 FE 是独立管理各自的审计信息的,在安装审计插件后,各个 FE 分别会启动各自的后台线程进行审计信息的获取攒批和 Stream load 写入。 `frontend_host_port` 配置项用于为插件后台 Stream Load 任务提供 http 协议的 IP 和端口,该参数不支持配置为多个值。其中,参数 IP 部分可以使用集群内任意某个 FE 的 IP,但并不推荐这样配置,因为若对应的 FE 出现异常,其他 FE 后台的审计信息写入任务也会因无法通信导致写入失败。推荐配置为默认的 `127.0.0.1:8030`,让各个 FE 均使用自身的 http 端口进行通信,以此规避其他 FE 异常时对通信的影响(当然,所有的写入任务最终都会被自动转发到 FE Leader 节点执行)。
1. 推荐使用参数 `frontend_host_port` 的默认配置,即 `127.0.0.1:8030` 。StarRocks 中各个 FE 是独立管理各自的审计信息的,在安装审计插件后,各个 FE 分别会启动各自的后台线程进行审计信息的获取攒批和 Stream Load 写入。 `frontend_host_port` 配置项用于为插件后台 Stream Load 任务提供 http 协议的 IP 和端口,该参数不支持配置为多个值。其中,参数 IP 部分可以使用集群内任意某个 FE 的 IP,但并不推荐这样配置,因为若对应的 FE 出现异常,其他 FE 后台的审计信息写入任务也会因无法通信导致写入失败。推荐配置为默认的 `127.0.0.1:8030`,让各个 FE 均使用自身的 http 端口进行通信,以此规避其他 FE 异常时对通信的影响(当然,所有的写入任务最终都会被自动转发到 FE Leader 节点执行)。
4.`filter` 参数可以配置审计信息入库的过滤条件,该处使用 Stream Load 中 [where 参数](https://docs.mirrorship.cn/zh/docs/sql-reference/sql-statements/data-manipulation/STREAM_LOAD/#opt_properties)实现,即`-H "where: <condition>"`,默认为空,配置示例:`filter=isQuery=1 and clientIp like '127.0.0.1%' and user='root'`。
0 commit comments