logstash-input-elasticsearch 4.20.3 → 4.20.4

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: 1da6df030d6db058a1c0bcb6b99b38252f4643f491c661d90f4227b0f06076dc
4
- data.tar.gz: d86e024f2946d2c9bf309658022047dd48c82b8c766ca71fbba290ff2113e0cd
3
+ metadata.gz: 8471702d33885c6c961b28b2008f5713140032b3599b0e31fbcc29a28e443828
4
+ data.tar.gz: 34921343e516dd0a21606d8ab33e270ead6db5ee0a3f93797ffea2916b736aeb
5
5
  SHA512:
6
- metadata.gz: c688445304b1f88e43394a926f0f14c4405797a8841d1b35ddef9adafdcce1acacaef2221c82e852863e9ba15935b0e96b3d2a59e45c0802632c6aea16278ff2
7
- data.tar.gz: 8600b782e75a5874fd4377f124882cc34a7761153ffe2b96d8d85e222e632e7cafa6c81a699a5de8882c27c1d18142d407c6fad3e6b0ea2d558edd1e6ac28acc
6
+ metadata.gz: ecf66d1369014d7d53dc0682b9a1174809c3fa1c571d13efb36c700fe1a9a819d5e1c13e21a2a13da2392e40b34b6bf5c9469ec431bbea2eed04e8547d9bae6e
7
+ data.tar.gz: db61b3448dec7659d304faafa163d81e0cf3b3a39f531a5638302ec75e69b7ef9e56741afed0c59552f95140c5cfb5641f5a506e9717802c423e43f028958a16
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 4.20.4
2
+ - Fix issue where the `index` parameter was being ignored when using `response_type => aggregations` [#209](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/209)
3
+
1
4
  ## 4.20.3
2
5
  - [DOC] Update link to bypass redirect, resolving directly to correct content [#206](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/206)
3
6
 
@@ -16,7 +16,7 @@ module LogStash
16
16
  @query = @plugin_params["query"]
17
17
  @retries = @plugin_params["retries"]
18
18
  @agg_options = {
19
- :index => @index,
19
+ :index => @plugin_params["index"],
20
20
  :size => 0
21
21
  }.merge(:body => @query)
22
22
 
@@ -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.3'
4
+ s.version = '4.20.4'
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"
@@ -1036,12 +1036,14 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
1036
1036
  end
1037
1037
 
1038
1038
  context "aggregations" do
1039
+ let(:index_name) { "rainbow" }
1039
1040
  let(:config) do
1040
1041
  {
1041
1042
  'hosts' => ["localhost"],
1042
1043
  'query' => '{ "query": {}, "size": 0, "aggs":{"total_count": { "value_count": { "field": "type" }}, "empty_count": { "sum": { "field": "_meta.empty_event" }}}}',
1043
1044
  'response_type' => 'aggregations',
1044
- 'size' => 0
1045
+ 'size' => 0,
1046
+ 'index' => index_name
1045
1047
  }
1046
1048
  end
1047
1049
 
@@ -1080,7 +1082,7 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
1080
1082
  before { plugin.register }
1081
1083
 
1082
1084
  it 'creates the events from the aggregations' do
1083
- expect(client).to receive(:search).with(any_args).and_return(mock_response)
1085
+ expect(client).to receive(:search).with(hash_including(:body => anything, :size => 0, :index => index_name)).and_return(mock_response)
1084
1086
  plugin.run queue
1085
1087
  event = queue.pop
1086
1088
 
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.3
4
+ version: 4.20.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement