logstash-output-amazon_es 0.1.1-java → 0.1.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c2acf97a9528eb65a98254dcb1fe672f62b9032
|
4
|
+
data.tar.gz: b488b329628b8f92f730872f5d637e7abfd08020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f0ce1624a8b95c732b91e4aa79c0f54223630d287d02b03cd2638ed54949aa8387f56acc3b6888525b2dc81f3ab39bfe8383d4f10b66ff240d86e9f515af228
|
7
|
+
data.tar.gz: edf5721b16b2f967e0cd0ca179baa5d8c2106f139a28eafb4b901556ba4cd8284fd9ff22737bac234bed91b2a5617c169f3dada7ad3066793b114b75158f5c19
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ An example configuration:
|
|
27
27
|
amazon_es {
|
28
28
|
hosts => ["foo.us-east-1.es.amazonaws.com"]
|
29
29
|
region => "us-east-1"
|
30
|
-
aws_access_key_id => 'ACCESS_KEY' (
|
30
|
+
aws_access_key_id => 'ACCESS_KEY' (optional can use instance profiles as well)
|
31
31
|
aws_secret_access_key => 'SECRET_KEY'
|
32
32
|
index => "production-logs-%{+YYYY.MM.dd}"
|
33
33
|
}
|
@@ -110,8 +110,8 @@ class LogStash::Outputs::AmazonES < LogStash::Outputs::Base
|
|
110
110
|
#Signing specific details
|
111
111
|
config :region, :validate => :string, :default => "us-east-1"
|
112
112
|
|
113
|
-
# aws_access_key_id and aws_secret_access_key
|
114
|
-
#
|
113
|
+
# aws_access_key_id and aws_secret_access_key .
|
114
|
+
# credential resolution logic as follows:
|
115
115
|
#
|
116
116
|
# - User passed aws_access_key_id and aws_secret_access_key in aes configuration
|
117
117
|
# - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
|
@@ -7,11 +7,11 @@ class AwsV4Signer < Faraday::Middleware
|
|
7
7
|
def initialize(env)
|
8
8
|
@env = env
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def headers
|
12
12
|
@env.request_headers
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def set_header(header)
|
16
16
|
@env.request_headers = header
|
17
17
|
end
|
@@ -29,19 +29,23 @@ class AwsV4Signer < Faraday::Middleware
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def signer
|
33
|
+
credentials = @options.fetch(:credentials)
|
34
|
+
service_name = @options.fetch(:service_name)
|
35
|
+
region = @options.fetch(:region)
|
36
|
+
Aws::Signers::V4.new(credentials, service_name, region)
|
37
|
+
end
|
38
|
+
|
39
|
+
def initialize(app, options = nil)
|
33
40
|
super(app)
|
34
|
-
|
35
|
-
service_name = options.fetch(:service_name)
|
36
|
-
region = options.fetch(:region)
|
37
|
-
@signer = Aws::Signers::V4.new(credentials, service_name, region)
|
41
|
+
@options = options
|
38
42
|
@net_http = app.is_a?(Faraday::Adapter::NetHttp)
|
39
43
|
end
|
40
44
|
|
41
45
|
def call(env)
|
42
46
|
normalize_for_net_http!(env)
|
43
47
|
req = Request.new(env)
|
44
|
-
|
48
|
+
signer().sign(req)
|
45
49
|
@app.call(env)
|
46
50
|
end
|
47
51
|
|
@@ -55,4 +59,4 @@ class AwsV4Signer < Faraday::Middleware
|
|
55
59
|
|
56
60
|
env.request_headers['Accept'] ||= '*/*'
|
57
61
|
end
|
58
|
-
end
|
62
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-amazon_es'
|
4
|
-
s.version = '0.1.
|
4
|
+
s.version = '0.1.2'
|
5
5
|
s.licenses = ['apache-2.0']
|
6
6
|
s.summary = "Logstash Output to Amazon Elasticsearch Service"
|
7
7
|
s.description = "Output events to Amazon Elasticsearch Service with V4 signing"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-amazon_es
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Amazon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|