logstash-input-elasticsearch 4.20.1 → 4.20.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d514926445adaa660e1e2f52cc8f453ff8e7fee24f15a66df8149ce8bb90a4d
4
- data.tar.gz: b3b3f8a9c7dcfae515724cbfae3d82152c6a03484fae88cd5520f3284bc87ae9
3
+ metadata.gz: 1da6df030d6db058a1c0bcb6b99b38252f4643f491c661d90f4227b0f06076dc
4
+ data.tar.gz: d86e024f2946d2c9bf309658022047dd48c82b8c766ca71fbba290ff2113e0cd
5
5
  SHA512:
6
- metadata.gz: 5facc890265d536b2846b7fc32cb12c1b266584822e0e56506788676d0b37b1f6ca0ab5b38393534a87c777a554abf0deb792734b6c7bcb3fe4d4fb2bc1c59e6
7
- data.tar.gz: 1e98e8a137f844a245ded3eb1eb0af4c2177d2e29fa5df5a9b63aac6a3b88796c643f71a809b96426c47b49b95a15b431b3c3493870ac622b58f0dac246021a3
6
+ metadata.gz: c688445304b1f88e43394a926f0f14c4405797a8841d1b35ddef9adafdcce1acacaef2221c82e852863e9ba15935b0e96b3d2a59e45c0802632c6aea16278ff2
7
+ data.tar.gz: 8600b782e75a5874fd4377f124882cc34a7761153ffe2b96d8d85e222e632e7cafa6c81a699a5de8882c27c1d18142d407c6fad3e6b0ea2d558edd1e6ac28acc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 4.20.3
2
+ - [DOC] Update link to bypass redirect, resolving directly to correct content [#206](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/206)
3
+
4
+ ## 4.20.2
5
+ - fix case when aggregation returns an error [#204](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/204)
6
+
1
7
  ## 4.20.1
2
8
  - Fix license header [#203](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/203)
3
9
 
data/docs/index.asciidoc CHANGED
@@ -301,10 +301,10 @@ can be either IP, HOST, IP:port, or HOST:port. The port defaults to
301
301
  * Value type is <<string,string>>
302
302
  * Default value is `"logstash-*"`
303
303
 
304
- The index or alias to search. See {ref}/multi-index.html[Multi Indices
305
- documentation] in the Elasticsearch documentation for more information on how to
306
- reference multiple indices.
307
-
304
+ The index or alias to search.
305
+ Check out {ref}/api-conventions.html#api-multi-index[Multi Indices
306
+ documentation] in the Elasticsearch documentation for info on
307
+ referencing multiple indices.
308
308
 
309
309
  [id="plugins-{type}s-{plugin}-password"]
310
310
  ===== `password`
@@ -30,6 +30,7 @@ module LogStash
30
30
  error_details = {:message => e.message, :cause => e.cause}
31
31
  error_details[:backtrace] = e.backtrace if logger.debug?
32
32
  logger.error("Tried #{job_name} unsuccessfully", error_details)
33
+ false
33
34
  end
34
35
 
35
36
  def do_run(output_queue)
@@ -37,7 +38,7 @@ module LogStash
37
38
  r = retryable(AGGREGATION_JOB) do
38
39
  @client.search(@agg_options)
39
40
  end
40
- @plugin.push_hit(r, output_queue, 'aggregations')
41
+ @plugin.push_hit(r, output_queue, 'aggregations') if r
41
42
  end
42
43
  end
43
44
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-elasticsearch'
4
- s.version = '4.20.1'
4
+ s.version = '4.20.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Reads query results from an Elasticsearch cluster"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -1071,17 +1071,16 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
1071
1071
  }
1072
1072
  end
1073
1073
 
1074
+ let(:client) { Elasticsearch::Client.new }
1074
1075
  before(:each) do
1075
- client = Elasticsearch::Client.new
1076
-
1077
1076
  expect(Elasticsearch::Client).to receive(:new).with(any_args).and_return(client)
1078
- expect(client).to receive(:search).with(any_args).and_return(mock_response)
1079
1077
  expect(client).to receive(:ping)
1080
1078
  end
1081
1079
 
1082
1080
  before { plugin.register }
1083
1081
 
1084
1082
  it 'creates the events from the aggregations' do
1083
+ expect(client).to receive(:search).with(any_args).and_return(mock_response)
1085
1084
  plugin.run queue
1086
1085
  event = queue.pop
1087
1086
 
@@ -1089,6 +1088,16 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
1089
1088
  expect(event.get("[total_counter][value]")).to eql 10
1090
1089
  expect(event.get("[empty_counter][value]")).to eql 5
1091
1090
  end
1091
+
1092
+ context "when there's an exception" do
1093
+ before(:each) do
1094
+ allow(client).to receive(:search).and_raise RuntimeError
1095
+ end
1096
+ it 'produces no events' do
1097
+ plugin.run queue
1098
+ expect(queue).to be_empty
1099
+ end
1100
+ end
1092
1101
  end
1093
1102
 
1094
1103
  context "retries" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.1
4
+ version: 4.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-14 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement