Skip to content

Commit

Permalink
Merge pull request elastic#714 from malthe/add-aws-proxy-support
Browse files Browse the repository at this point in the history
Added 'proxy_uri' option to AWS-based plugins.
  • Loading branch information
Richard Pijnenburg committed Oct 11, 2013
2 parents a133c31 + e0e1d31 commit cbf2a9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
- bugfix: elasticsearch: the default port range is now 9300-9305; the older
range up to 9400 was unnecessary and could cause problems for the
elasticsearch cluster in some cases.
- improvement: aws-based outputs (e.g. cloudwatch) now support proxy uri.
- bugfix: rabbitmq: disable automatic connection recovery (LOGSTASH-1350)
(#642)
- bugfix: riemann: fixed tagging of riemann events (#631)
Expand Down
9 changes: 8 additions & 1 deletion lib/logstash/plugin_mixins/aws_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def setup_aws_config
# The AWS SDK for Ruby defaults to SSL so we preserve that
config :use_ssl, :validate => :boolean, :default => true

# URI to proxy server if required
config :proxy_uri, :validate => :string

# Path to YAML file containing a hash of AWS credentials.
# This file will only be loaded if `access_key_id` and
# `secret_access_key` aren't set. The contents of the
Expand Down Expand Up @@ -68,6 +71,10 @@ def aws_options_hash

opts[:use_ssl] = @use_ssl

if (@proxy_uri)
opts[:proxy_uri] = @proxy_uri
end

# The AWS SDK for Ruby doesn't know how to make an endpoint hostname from a region
# for example us-west-1 -> foosvc.us-west-1.amazonaws.com
# So our plugins need to know how to generate their endpoints from a region
Expand All @@ -82,4 +89,4 @@ def aws_options_hash
return opts
end # def aws_options_hash

end
end

0 comments on commit cbf2a9a

Please sign in to comment.