Skip to content

Commit

Permalink
print slow query to log files (#3045)
Browse files Browse the repository at this point in the history
* print slow query to log files

* Update 3.graph-config.md

* comment fix

* Update 3.graph-config.md
  • Loading branch information
abby-cyber authored Oct 13, 2023
1 parent 8e7db95 commit 18bd909
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Graph 服务提供了两份初始配置文件`nebula-graphd.conf.default`和`neb
| `ws_http_port` | `19669` | HTTP 服务的端口。 |不支持|
|`heartbeat_interval_secs` | `10` | 默认心跳间隔。请确保所有服务的`heartbeat_interval_secs`取值相同,否则会导致系统无法正常工作。单位:秒。 |支持|
|`storage_client_timeout_ms`|-| Graph 服务与 Storage 服务的 RPC 连接超时时间。初始配置文件中未设置该参数,使用需手动添加。默认值为`60000`毫秒。|不支持|
|`enable_record_slow_query`|`true`|是否启用慢查询记录。注:企业版功能。|不支持|
|`enable_record_slow_query`|`true`|是否启用慢查询记录。注:企业版功能。<br/>当将其设置为`true`时,如果查询的执行时间超过`slow_query_threshold_us`定义的时间,{{nebula.name}}会将该查询记录到日志文件中。<br/>同时,`graphd`进程的内存中会缓存最近的几条慢查询,其缓存条数由`slow_query_limit`定义。缓存的慢查询可以通过 HTTP 接口获取。|不支持|
|`slow_query_limit`|`100`|慢查询记录的最大条数。注:企业版功能。|不支持|
|`slow_query_threshold_us`|`200000`|定义超过多长时间的查询为慢查询。单位:微秒。|不支持|
|`ws_meta_http_port`|`19559`|HTTP 协议监听 Meta 服务的端口,需要和 Meta 服务配置文件中的`ws_http_port`保持一致。|不支持|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
|`missingok`| 如果日志文件丢失,不报告错误。|
|`notifempty`| 如果日志文件为空,不进行轮转。|
|`create 644 root root`| 创建新的日志文件,并设置适当的权限和所有者。|
|`dateext`| 在日志文件名中添加日期后缀。<br\>默认是当前日期。默认是`-%Y%m%d`的后缀。可用`dateformat`选项扩展配置。|
|`dateformat .%Y-%m-%d-%s`| 必须配合`dateext`使用,紧跟在下一行出现,定义文件切割后的文件名。<br\>在V3.9.0 之前,只支持`%Y``%m``%d``%s`参数。在V3.9.0 及之后,支持 %H 参数<br\>**注意**:文件名称中禁止出现分号(:) ,因为文件名称不能含有分号|
|`dateext`| 在日志文件名中添加日期后缀。<br/>默认是当前日期。默认是`-%Y%m%d`的后缀。可用`dateformat`选项扩展配置。|
|`dateformat .%Y-%m-%d-%s`| 必须配合`dateext`使用,紧跟在下一行出现,定义文件切割后的文件名。<br/>在V3.9.0 之前,只支持`%Y``%m``%d``%s`参数。在V3.9.0 及之后,支持 %H 参数。|
|`maxsize 1k`| 当日志文件大小超过`1`千字节(`1024`字节)或者超过设定的周期(如`daily`)时,进行日志轮转。可用的大小单位有:`k``M`,默认单位为字节。|

用户可以根据实际需求修改配置文件中的参数。更多关于参数的配置及解释,参见 [logrotate](https://man7.org/linux/man-pages/man8/logrotate.8.html)。
Expand Down

0 comments on commit 18bd909

Please sign in to comment.