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

Adding SSL Support #61

Merged
merged 3 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
| <<plugins-{type}s-{plugin}-key>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-threads>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-timeout>> |<<number,number>>|No
|=======================================================================
Expand Down Expand Up @@ -127,6 +128,15 @@ Password to authenticate with. There is no authentication by default.

The port to connect on.

[id="plugins-{type}s-{plugin}-ssl"]
===== `ssl`

* Value type is <<boolean,boolean>>
* Default value is `false`

Enable SSL support.


[id="plugins-{type}s-{plugin}-threads"]
===== `threads`

Expand Down
6 changes: 5 additions & 1 deletion lib/logstash/inputs/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable
# The port to connect on.
config :port, :validate => :number, :default => 6379

# SSL
config :ssl, :validate => :boolean, :default => false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this must be documented in the docs/index.asciidoc file, as that is the source of truth for the plugin's documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the requested documentation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsvd Can we merge it?


# The unix socket path to connect on. Will override host and port if defined.
# There is no unix socket path by default.
config :path, :validate => :string
Expand Down Expand Up @@ -133,7 +136,8 @@ def redis_params
baseParams = {
:timeout => @timeout,
:db => @db,
:password => @password.nil? ? nil : @password.value
:password => @password.nil? ? nil : @password.value,
:ssl => @ssl
}

return connectionParams.merge(baseParams)
Expand Down