fluent-plugin-elasticsearch 3.3.3 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +5 -0
- data/README.md +25 -0
- data/fluent-plugin-elasticsearch.gemspec +1 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +15 -0
- data/test/plugin/test_out_elasticsearch.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e8eed03eaeddf3765e1ac07f5038cd026bacbc7f86d63b286af4da186c7d04f
|
4
|
+
data.tar.gz: 17d90e2717897e2a021629b4414c475954ff0100c16b9d4db2526e8bd4ffc084
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d36c2a7804887d9f974e26d55a2abbd8ade8e042126f5f6b7bbc586db0ff63fe6195feb8a51d5c610e8ffbc9274d76a886290f49af10ce0ff005d72758fb81
|
7
|
+
data.tar.gz: 0b3bfaf992cfebd919cdc526c52e5b3200cc70cc424bce51a197cc7915890e9b495904ce367cdb329df69b182c6928675d6872f9ce4e579d55cb2f9e5b53304d
|
data/History.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
### [Unreleased]
|
4
4
|
|
5
|
+
### 3.4.0
|
6
|
+
- Check exclusive feature on #configure (#569)
|
7
|
+
- Modify FAQ for highly load k8s EFK stack (#566)
|
8
|
+
- Add FAQ for high load k8s EFK stack (#564)
|
9
|
+
|
5
10
|
### 3.3.3
|
6
11
|
- Add unit test for exception message (#563)
|
7
12
|
- Add ignore_exceptions config (#562)
|
data/README.md
CHANGED
@@ -91,6 +91,7 @@ Current maintainers: @cosmo0920
|
|
91
91
|
+ [Declined logs are resubmitted forever, why?](#declined-logs-are-resubmitted-forever-why)
|
92
92
|
+ [Suggested to increase flush_thread_count, why?](#suggested-to-increase-flush_thread_count-why)
|
93
93
|
+ [Suggested to install typhoeus gem, why?](#suggested-to-install-typhoeus-gem-why)
|
94
|
+
+ [Stopped to send events on k8s, why?](#stopped-to-send-events-on-k8s-why)
|
94
95
|
* [Contact](#contact)
|
95
96
|
* [Contributing](#contributing)
|
96
97
|
* [Running tests](#running-tests)
|
@@ -1330,6 +1331,30 @@ td-agent-gem install typhoeus
|
|
1330
1331
|
|
1331
1332
|
In more detail, please refer to [the official plugin management document](https://docs.fluentd.org/v1.0/articles/plugin-management).
|
1332
1333
|
|
1334
|
+
### Stopped to send events on k8s, why?
|
1335
|
+
|
1336
|
+
fluent-plugin-elasticsearch reloads connection after 10000 requests. (Not correspond to events counts because ES plugin uses bulk API.)
|
1337
|
+
|
1338
|
+
This functionality which is originated from elasticsaearch-ruby gem is enabled by default.
|
1339
|
+
|
1340
|
+
Sometimes this reloading functionality bothers users to send events with ES plugin.
|
1341
|
+
|
1342
|
+
On k8s platform, users sometimes shall specify the following settings:
|
1343
|
+
|
1344
|
+
```aconf
|
1345
|
+
reload_connections false
|
1346
|
+
reconnect_on_error true
|
1347
|
+
reload_on_failure true
|
1348
|
+
```
|
1349
|
+
|
1350
|
+
If you use [fluentd-kubernetes-daemonset](https://github.com/fluent/fluentd-kubernetes-daemonset), you can specify them with environment variables:
|
1351
|
+
|
1352
|
+
* `FLUENT_ELASTICSEARCH_RELOAD_CONNECTIONS` as `false`
|
1353
|
+
* `FLUENT_ELASTICSEARCH_RECONNECT_ON_ERROR` as `true`
|
1354
|
+
* `FLUENT_ELASTICSEARCH_RELOAD_ON_FAILURE` as `true`
|
1355
|
+
|
1356
|
+
This issue had been reported at [#525](https://github.com/uken/fluent-plugin-elasticsearch/issues/525).
|
1357
|
+
|
1333
1358
|
## Contact
|
1334
1359
|
|
1335
1360
|
If you have a question, [open an Issue](https://github.com/uken/fluent-plugin-elasticsearch/issues).
|
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'fluent-plugin-elasticsearch'
|
6
|
-
s.version = '3.
|
6
|
+
s.version = '3.4.0'
|
7
7
|
s.authors = ['diogo', 'pitr']
|
8
8
|
s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com']
|
9
9
|
s.description = %q{Elasticsearch output plugin for Fluent event collector}
|
@@ -176,6 +176,12 @@ EOC
|
|
176
176
|
|
177
177
|
raise Fluent::ConfigError, "'max_retry_putting_template' must be positive number." if @max_retry_putting_template < 0
|
178
178
|
|
179
|
+
# Raise error when using host placeholders and template features at same time.
|
180
|
+
valid_host_placeholder = placeholder?(:host_placeholder, @host)
|
181
|
+
if valid_host_placeholder && (@template_name && @template_file || @templates)
|
182
|
+
raise Fluent::ConfigError, "host placeholder and template installation are exclusive features."
|
183
|
+
end
|
184
|
+
|
179
185
|
if !Fluent::Engine.dry_run_mode
|
180
186
|
if @template_name && @template_file
|
181
187
|
retry_operate(@max_retry_putting_template) do
|
@@ -289,6 +295,15 @@ EOC
|
|
289
295
|
end.compact
|
290
296
|
end
|
291
297
|
|
298
|
+
def placeholder?(name, param)
|
299
|
+
begin
|
300
|
+
placeholder_validate!(name, param)
|
301
|
+
true
|
302
|
+
rescue Fluent::ConfigError
|
303
|
+
false
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
292
307
|
def backend_options
|
293
308
|
case @http_backend
|
294
309
|
when :excon
|
@@ -659,6 +659,26 @@ class ElasticsearchOutput < Test::Unit::TestCase
|
|
659
659
|
}
|
660
660
|
end
|
661
661
|
|
662
|
+
def test_template_installation_exclusive_for_host_placeholder
|
663
|
+
cwd = File.dirname(__FILE__)
|
664
|
+
template_file = File.join(cwd, 'test_template.json')
|
665
|
+
|
666
|
+
config = %{
|
667
|
+
host logs-${tag}.google.com
|
668
|
+
port 777
|
669
|
+
scheme https
|
670
|
+
path /es/
|
671
|
+
user john
|
672
|
+
password doe
|
673
|
+
template_name logstash
|
674
|
+
template_file #{template_file}
|
675
|
+
}
|
676
|
+
|
677
|
+
assert_raise(Fluent::ConfigError) do
|
678
|
+
driver(config)
|
679
|
+
end
|
680
|
+
end
|
681
|
+
|
662
682
|
def test_template_retry_install
|
663
683
|
cwd = File.dirname(__FILE__)
|
664
684
|
template_file = File.join(cwd, 'test_template.json')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- diogo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-03-
|
12
|
+
date: 2019-03-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|