Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: inappropriate default timeout of syslog schema #6807

Merged
merged 2 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apisix/plugins/syslog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local schema = {
retry_interval = {type = "integer", minimum = 0},
flush_limit = {type = "integer", minimum = 1, default = 4096},
drop_limit = {type = "integer", default = 1048576},
timeout = {type = "integer", minimum = 1, default = 3},
timeout = {type = "integer", minimum = 1, default = 3000},
sock_type = {type = "string", default = "tcp", enum = {"tcp", "udp"}},
pool_size = {type = "integer", minimum = 5, default = 5},
tls = {type = "boolean", default = false},
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/syslog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This will provide the ability to send Log data requests as JSON objects.
| host | string | required | | | IP address or the Hostname. |
| port | integer | required | | | Target upstream port. |
| name | string | optional | "sys logger" | | |
| timeout | integer | optional | 3 | [1, ...] | Timeout for the upstream to send data. |
| timeout | integer | optional | 3000 | [1, ...] | Timeout for the upstream to send data (unit: ms). |
| tls | boolean | optional | false | | Control whether to perform SSL verification |
| flush_limit | integer | optional | 4096 | [1, ...] | If the buffered messages' size plus the current message size reaches (>=) this limit (in bytes), the buffered log messages will be written to log server. Default to 4096 (4KB). |
| drop_limit | integer | optional | 1048576 | | If the buffered messages' size plus the current message size is larger than this limit (in bytes), the current log message will be dropped because of limited buffer size. Default to 1048576 (1MB). |
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/syslog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ title: syslog
| host | string | 必须 | | | IP 地址或主机名 |
| port | integer | 必须 | | | 目标上游端口 |
| name | string | 可选 | "sys logger" | | |
| timeout | integer | 可选 | 3 | [1, ...] | 上游发送数据超时 |
| timeout | integer | 可选 | 3000 | [1, ...] | 上游发送数据超时(单位: 毫秒) |
| tls | boolean | 可选 | false | | 用于控制是否执行 SSL 验证 |
| flush_limit | integer | 可选 | 4096 | [1, ...] | 如果缓冲的消息的大小加上当前消息的大小达到(> =)此限制(以字节为单位),则缓冲的日志消息将被写入日志服务器。默认为 4096(4KB)|
| drop_limit | integer | 可选 | 1048576 | | 如果缓冲的消息的大小加上当前消息的大小大于此限制(以字节为单位),则由于缓冲区大小有限,当前的日志消息将被丢弃。默认为 1048576(1MB)|
Expand Down