logstash-input-elasticsearch 4.20.2 → 4.20.4

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
  SHA256:
3
- metadata.gz: f2f89fa4a24aa44a90e6587f7e1e7200a64198c7a2daac985204632309ce7d35
4
- data.tar.gz: a5fbe5a017b80c86ac6d87f96fd6892f6678b0ddc3b2e0b53da14805c2241848
3
+ metadata.gz: 8471702d33885c6c961b28b2008f5713140032b3599b0e31fbcc29a28e443828
4
+ data.tar.gz: 34921343e516dd0a21606d8ab33e270ead6db5ee0a3f93797ffea2916b736aeb
5
5
  SHA512:
6
- metadata.gz: 15aebcabed876f5f05a1a3076736fd53e4485c420210e482c76745380f689687aaa336bc6e0c3c6e31a13ca9ff12fb16c4b70e1c1f88df41a8d41c59879c22d1
7
- data.tar.gz: afa2124136c904c54daeac924df2138e0791aab8b91a5a1ceb0e9b86c81bd5ffcada45d211a2decc9a8c712e6bfbeadd0cd45d975891b46c023495b0c52a009d
6
+ metadata.gz: ecf66d1369014d7d53dc0682b9a1174809c3fa1c571d13efb36c700fe1a9a819d5e1c13e21a2a13da2392e40b34b6bf5c9469ec431bbea2eed04e8547d9bae6e
7
+ data.tar.gz: db61b3448dec7659d304faafa163d81e0cf3b3a39f531a5638302ec75e69b7ef9e56741afed0c59552f95140c5cfb5641f5a506e9717802c423e43f028958a16
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
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
+
4
+ ## 4.20.3
5
+ - [DOC] Update link to bypass redirect, resolving directly to correct content [#206](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/206)
6
+
1
7
  ## 4.20.2
2
8
  - fix case when aggregation returns an error [#204](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/204)
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`
@@ -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.2'
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.2
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-03-05 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