fluent-plugin-aws-elasticsearch-service 0.1.6 → 0.1.7.pre.alpha
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: 2600c216583522a9225c296e0e08b69e83ab43b0
|
4
|
+
data.tar.gz: 3290c1a3dfef7268c864fdfc8537bcc9b98701c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce5905d8c5681741da685cdf6cbae33becac308e63222f6a3461c4c730fadcd05e07ae372af8022d04a2c72ef2c4bde3f336fa9250a67b9e6920bfd516bebb92
|
7
|
+
data.tar.gz: 2381c6e58f8248368067040637d8c857dfd00a7b41aeb9641498b353e4582e554e40298b7085abf93fb858d0e53dd7a9991f5d934eae94d17dbc59de7dd947f0
|
data/README.md
CHANGED
@@ -90,7 +90,7 @@ Additionally, you can use an STS assumed role as the authenticating factor and i
|
|
90
90
|
<endpoint>
|
91
91
|
url https://CLUSTER_ENDPOINT_URL
|
92
92
|
region eu-west-1
|
93
|
-
assume_role_arn arn:aws:sts::ACCOUNT:
|
93
|
+
assume_role_arn arn:aws:sts::ACCOUNT:role/ROLE
|
94
94
|
assume_role_session_name SESSION_ID # Defaults to fluentd if omitted
|
95
95
|
</endpoint>
|
96
96
|
```
|
@@ -126,6 +126,14 @@ You'll need to ensure that the environment in which the fluentd plugin runs has
|
|
126
126
|
}
|
127
127
|
```
|
128
128
|
|
129
|
+
## Troubleshooting
|
130
|
+
|
131
|
+
* "Elasticsearch::Transport::Transport::Errors::Forbidden" error="[403]" even after verifying the access keys/roles/policies.
|
132
|
+
* Ensure you don't have a trailing slash on the endpoint URL in your fluentd configuration file (see CLUSTER_ENDPOINT_URL above).
|
133
|
+
|
134
|
+
* "ElasticsearchIllegalArgumentException[explicit index in bulk is not allowed]"
|
135
|
+
* Check that `rest.action.multi.allow_explicit` is set true on your Amazon ES domain (verify in the console - there's a bug in Terraform, https://github.com/hashicorp/terraform/issues/3980).
|
136
|
+
|
129
137
|
## Development
|
130
138
|
|
131
139
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "fluent-plugin-aws-elasticsearch-service"
|
8
|
-
spec.version = "0.1.
|
8
|
+
spec.version = "0.1.7-alpha"
|
9
9
|
spec.authors = ["atomita"]
|
10
10
|
spec.email = ["sleeping.cait.sith+gh@gmail.com"]
|
11
11
|
|
@@ -17,9 +17,16 @@ module Fluent
|
|
17
17
|
config_param :access_key_id, :string, :default => ""
|
18
18
|
config_param :secret_access_key, :string, :default => ""
|
19
19
|
config_param :assume_role_arn, :string, :default => nil
|
20
|
+
config_param :ecs_container_credentials_relative_uri, :string, :default => nil #Set with AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable value
|
20
21
|
config_param :assume_role_session_name, :string, :default => "fluentd"
|
21
22
|
end
|
22
23
|
|
24
|
+
# here overrides default value of reload_connections to false because
|
25
|
+
# AWS Elasticsearch Service doesn't return addresses of nodes and Elasticsearch client
|
26
|
+
# fails to reload connections properly. This ends up "temporarily failed to flush the buffer"
|
27
|
+
# error repeating forever. See this discussion for details:
|
28
|
+
# https://discuss.elastic.co/t/elasitcsearch-ruby-raises-cannot-get-new-connection-from-pool-error/36252
|
29
|
+
config_set_default :reload_connections, false
|
23
30
|
|
24
31
|
#
|
25
32
|
# @override
|
@@ -63,10 +70,15 @@ module Fluent
|
|
63
70
|
credentials = Aws::Credentials.new opts[:access_key_id], opts[:secret_access_key]
|
64
71
|
else
|
65
72
|
if opts[:assume_role_arn].nil?
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
73
|
+
if opts[:ecs_container_credentials_relative_uri].nil?
|
74
|
+
credentials = Aws::SharedCredentials.new({retries: 2}).credentials
|
75
|
+
credentials ||= Aws::InstanceProfileCredentials.new.credentials
|
76
|
+
credentials ||= Aws::ECSCredentials.new.credentials
|
77
|
+
else
|
78
|
+
credentials = Aws::ECSCredentials.new({
|
79
|
+
credential_path: opts[:ecs_container_credentials_relative_uri]
|
80
|
+
}).credentials
|
81
|
+
end
|
70
82
|
else
|
71
83
|
credentials = sts_credential_provider({
|
72
84
|
role_arn: opts[:assume_role_arn],
|
@@ -80,7 +92,7 @@ module Fluent
|
|
80
92
|
end
|
81
93
|
def calback.inspect
|
82
94
|
credentials = self.call
|
83
|
-
|
95
|
+
credentials.credentials.inspect
|
84
96
|
end
|
85
97
|
calback
|
86
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-aws-elasticsearch-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7.pre.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- atomita
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -143,12 +143,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- - "
|
146
|
+
- - ">"
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
148
|
+
version: 1.3.1
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.6.11
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Output plugin to post to "Amazon Elasticsearch Service".
|