logstash-output-solr-lw 0.4.0 → 0.5.0

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: d6da74296645506a69741e57a51604b8a89e6c945a563abb84a6b494e873004b
4
- data.tar.gz: 06f349ca9b8013f4d6fb81bc9910ec4129465e8e3f4988315365e7b369fb2add
3
+ metadata.gz: e4cd884e30345ea01084423d67979dea2a60fdfa65c6aa0899a61b70e8ab214a
4
+ data.tar.gz: 6f70bdf98145431da75d107339629d2995b4ab8b2c813b5a1227a09ee5cd83c4
5
5
  SHA512:
6
- metadata.gz: 4a4530a90826245c3878b66472c2bd5ede427714b5a7231d4d155f0e45aa48757d0137d64936a317ab5a5f2f8f891ae696f874cffd0bf6badf0f12ac36b6c029
7
- data.tar.gz: 86a9cb046c6df0d1a61f25c6d7d8d037a3056798c1d644a84e86590988c203ce014dc3edb1649844d75727a5f29779a34edf4f2e2297fc914d66556eccff500d
6
+ metadata.gz: 878b6c260ce17e3c92beefafe7df63a26545da2816c9b14b24e89ca45ae24d547960ecce38b46ad948910200fd7f36c8ded40d7e4ac0375efe7b6003c0ac3744
7
+ data.tar.gz: bace73f59af9ef3b8226ab6062f4ee27897ad54d0f991368a124c4f212d8baa8011bd7c87f6d376c7d2d6ace6de25bed446217aa4f20668d496ebad265af9ff5
@@ -7,6 +7,7 @@ require "stud/buffer"
7
7
  require 'rsolr'
8
8
  require 'zk'
9
9
  require 'rsolr/cloud'
10
+ require 'uri'
10
11
 
11
12
  # An Solr output that send data to Apache Solr.
12
13
  class LogStash::Outputs::Solr < LogStash::Outputs::Base
@@ -21,6 +22,10 @@ class LogStash::Outputs::Solr < LogStash::Outputs::Base
21
22
  config :zk_host, :validate => :string, :default => nil
22
23
  # The SolrCloud collection name.
23
24
  config :collection, :validate => :string, :default => 'collection1'
25
+
26
+ # Basic Auth username and password
27
+ config :user, :validate => :string, :default => nil
28
+ config :password, :validate => :string, :default => nil
24
29
 
25
30
  # A field name with the name of collection to send document to.
26
31
  # If this property is nil then "collection" property is used.
@@ -63,10 +68,17 @@ class LogStash::Outputs::Solr < LogStash::Outputs::Base
63
68
  @zk = nil
64
69
 
65
70
  if @mode == MODE_STANDALONE then
66
- @solr_std[@collection] = RSolr.connect :url => @url
71
+ u = @url
72
+ if !@user.nil? and !@user.to_s.strip.empty? and !@password.nil? and !@password.to_s.strip.empty? then
73
+ uri = URI.parse(@url)
74
+ uri.user = @user
75
+ uri.password = @password
76
+ u = uri.to_s()
77
+ end
78
+ @solr_std[@collection] = RSolr.connect :url => u
67
79
  elsif @mode == MODE_SOLRCLOUD then
68
80
  @zk = ZK.new(@zk_host)
69
- cloud_connection = RSolr::Cloud::Connection.new(@zk)
81
+ cloud_connection = RSolr::Cloud::Connection.new(@zk, :user => @user, :password => @password)
70
82
  @solr_cloud = RSolr::Client.new(cloud_connection, read_timeout: 60, open_timeout: 60)
71
83
  end
72
84
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-solr-lw'
3
- s.version = "0.4.0"
3
+ s.version = "0.5.0"
4
4
  s.licenses = ["Apache License (2.0)"]
5
5
  s.summary = "Logstash output plugin for sending data to Solr."
6
6
  s.description = "Logstash output plugin for sending data to Solr. It supports SolrCloud, not only Standalone Solr."
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.add_runtime_dependency 'rsolr', '~> 1.1.2'
25
25
  s.add_runtime_dependency 'zk'
26
- s.add_runtime_dependency 'rsolr-cloud-lw'
26
+ s.add_runtime_dependency 'rsolr-cloud-lw', '~> 1.1.1'
27
27
  s.add_runtime_dependency 'stud'
28
28
 
29
29
  s.add_development_dependency "logstash-core", ">= 1.60", "<= 2.99"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-solr-lw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minoru Osuka
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-24 00:00:00.000000000 Z
12
+ date: 2019-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -76,17 +76,17 @@ dependencies:
76
76
  - !ruby/object:Gem::Dependency
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">="
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0'
81
+ version: 1.1.1
82
82
  name: rsolr-cloud-lw
83
83
  prerelease: false
84
84
  type: :runtime
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 1.1.1
90
90
  - !ruby/object:Gem::Dependency
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements: