-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support tls in syslog #2399
Support tls in syslog #2399
Conversation
protocol_type have been deprecated param Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
All test failed. Could you check it? |
lib/fluent/plugin/in_syslog.rb
Outdated
@@ -74,7 +74,7 @@ class SyslogInput < Input | |||
desc 'The prefix of the tag. The tag itself is generated by the tag prefix, facility level, and priority.' | |||
config_param :tag, :string | |||
desc 'The transport protocol used to receive logs.(udp, tcp)' | |||
config_param :protocol_type, :enum, list: [:tcp, :udp], default: :udp | |||
config_param :protocol_type, :enum, list: [:tcp, :udp], default: nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For deprecated parameter, use deprecated:
log.info "listening syslog socket on #{@bind}:#{@port} with #{@protocol_type}" | ||
case @protocol_type | ||
log.info "listening syslog socket on #{@bind}:#{@port} with #{@protocol_type || @transport_config.protocol}" | ||
case @protocol_type || @transport_config.protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default @transport_config.protocol
is tcp
. Change default to udp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch 🙏
f23566a
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
6681953
to
f23566a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a nitpicks comment.
lib/fluent/plugin/in_syslog.rb
Outdated
@@ -107,6 +107,11 @@ class SyslogInput < Input | |||
config_param :with_priority, :bool, default: true | |||
end | |||
|
|||
# overwrite server plugin to change default to :udp | |||
config_section :transport, required: false, multi: false, init: true, param_name: :transport_config do | |||
config_argument :protocol, :enum, list: [:tcp, :tls], default: :udp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the following line?
config_argument :protocol, :enum, list: [:tcp, :udp, :tls], default: :udp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Thank you. bf319e9
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
f23566a
to
bf319e9
Compare
I confirmed this works with rsyslog. See configuration example.
|
Which issue(s) this PR fixes:
none
What this PR does / why we need it:
support tls for in_syslog
Docs Changes:
needed. I'll change docs.
Release Note:
same as title