logstash-input-mongoprofile 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: cd0889730d84a5ca705d75deb849163985c2fc99
4
- data.tar.gz: 2378ae1b19f5bdb762db38d904d164bed3f689d7
3
+ metadata.gz: 386e6631fd7c0d1808d74cdd3fa0826a622d7b43
4
+ data.tar.gz: 34c1f19b1ed4eed887ac1d19e0cfc220f3a4be96
5
5
  SHA512:
6
- metadata.gz: 0c589f5fe8f5fc7ac3c8d9a4115a53a4e32c5e46237033dd723ba8f35387507046d77c9aeaf1e5b14a33c7b365d72c75b04fca07b322b7a413aeb90c2c950868
7
- data.tar.gz: 3b2e460a21216cc892881f64f37f8d8b05ada665d32c8bb713295d9aa1343c8a5d9caf648c6cf3d0dcc0f74116311788adcb01d01588b90528a8e3f766acc12d
6
+ metadata.gz: 7652cf1aef3e325e8df24a27185c56146f9863e6170a7e5e6c532909ff106bdb02bc753eb279b1849980b80c62416b3e3f7ce1063657e72deca791dcb58abd4d
7
+ data.tar.gz: 579b0048bbf4a46c28039ec55b715445e9c42eca1927c31565bdf41a02c936af985f7f5a233f2b4c16f4191337fe86f92ca3df89e29fc24c90eadb59c7b1349a
@@ -9,7 +9,7 @@ require '../../../lib/mongo/mongo'
9
9
  #
10
10
  # This plugin is intented only as an example.
11
11
 
12
- class LogStash::Inputs::Example < LogStash::Inputs::Base
12
+ class LogStash::Inputs::Mongoprofile < LogStash::Inputs::Base
13
13
  config_name 'mongoprofile'
14
14
 
15
15
 
@@ -24,7 +24,7 @@ class LogStash::Inputs::Example < LogStash::Inputs::Base
24
24
  public
25
25
  def register
26
26
  @host = Socket.gethostname
27
- @controller = Controller.new(@host, @url, 'system.profile', 1000, @path)
27
+ @controller = Controller.new(@host, @url, 'system.profile', 1000, @path, @client_host)
28
28
  end # def register
29
29
 
30
30
  def run(queue)
@@ -53,4 +53,4 @@ class LogStash::Inputs::Example < LogStash::Inputs::Base
53
53
  # * cleanup temporary files
54
54
  # * terminate spawned threads
55
55
  end
56
- end # class LogStash::Inputs::Example
56
+ end # class LogStash::Inputs::Mongoprofile
data/lib/mongo/mongo.rb CHANGED
@@ -79,8 +79,8 @@ class LastValueStore
79
79
  end
80
80
 
81
81
  class Controller
82
- def initialize(event, url, collection, limit, path)
83
- @mongo_accessor = MongoAccessor.new(url, collection)
82
+ def initialize(event, url, collection, limit, path, client_host)
83
+ @mongo_accessor = MongoAccessor.new(url, collection, client_host)
84
84
  @last_value_store = LastValueStore.new(path, collection)
85
85
  @document_parser = DocumentParser.new(event)
86
86
  @limit = limit
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-mongoprofile'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This example input streams a string at a definable interval."
6
6
  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"
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
2
  require "logstash/devutils/rspec/spec_helper"
3
- require "logstash/inputs/example"
3
+ require "logstash/inputs/mongoprofile"
4
4
 
5
- describe LogStash::Inputs::Example do
5
+ describe LogStash::Inputs::Mongoprofile do
6
6
 
7
7
  it_behaves_like "an interruptible input plugin" do
8
8
  let(:config) { { "interval" => 100 } }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-mongoprofile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
@@ -106,10 +106,10 @@ files:
106
106
  - LICENSE
107
107
  - NOTICE.TXT
108
108
  - README.md
109
- - lib/logstash/inputs/example.rb
109
+ - lib/logstash/inputs/mongoprofile.rb
110
110
  - lib/mongo/mongo.rb
111
111
  - logstash-input-mongoprofile.gemspec
112
- - spec/inputs/example_spec.rb
112
+ - spec/inputs/mongoprofile_spec.rb
113
113
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
114
114
  licenses:
115
115
  - Apache License (2.0)
@@ -137,4 +137,4 @@ signing_key:
137
137
  specification_version: 4
138
138
  summary: This example input streams a string at a definable interval.
139
139
  test_files:
140
- - spec/inputs/example_spec.rb
140
+ - spec/inputs/mongoprofile_spec.rb