logstash-input-mongoprofile 0.1.8 → 0.1.9

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
  SHA1:
3
- metadata.gz: d9ddb07ddef37f8f33a7b86cb92234ddd68ebf43
4
- data.tar.gz: 1eaefb1378c21fc977cd83a63f6836ee5c8922e8
3
+ metadata.gz: 58de1f30a6699c3dfee6732536168bfa2377f157
4
+ data.tar.gz: a9cfab9bf5d796aec988f8c128a6486911d0868f
5
5
  SHA512:
6
- metadata.gz: 1fb2738ea5f931be2372eb8ec6c46838611e1fd401447da710e1f3d81562a010e19bab5806b718763395383a168327a7ff9b1969acaa05fd55e43cefb1949361
7
- data.tar.gz: 3702c6fa7ccdd71bf379b346b5991e83f1300829f4baea20f6e28b8fb343797876c57ddbc4e985ca8807c188004161975eac65a1b6142034690007d02ff5d7bf
6
+ metadata.gz: c8d3d04fdfd48355829a861ca625cb60355b12299586c31afbcb131ee67eba1f5b88c64db0e45c0a1d8e09f4fcde79bb40725fe408cfc7105a6942e0d0e1c923
7
+ data.tar.gz: 4caffb900ac1b8072fc8367f0e566f993e8f0a63b310002eba6341e2b57d71eb3f11d7138be42f954cc00a7bba6897ec8bd52d1c45890bebc4d9439af05c450a
@@ -4,6 +4,7 @@ require "logstash/namespace"
4
4
  require "stud/interval"
5
5
  require "socket" # for Socket.gethostname
6
6
  require "mongo"
7
+ require "date"
7
8
 
8
9
  # Generate a repeating message.
9
10
  #
@@ -73,7 +74,7 @@ class MongoAccessor
73
74
  end
74
75
 
75
76
  def get_documents_by_ts(date, limit)
76
- @collection.find({:ts => {:$gt => date}, :client => {:$ne => @client_host}}).limit(limit).sort(:ts => -1)
77
+ @collection.find({:ts => {:$gt => DateTime.parse(date)}, :client => {:$ne => @client_host}}).limit(limit).sort(:ts => -1)
77
78
  end
78
79
 
79
80
  def get_documents(limit)
@@ -0,0 +1,3 @@
1
+ require('date')
2
+ a = DateTime.parse("2017-06-22 08:14:12 UTC\n")
3
+ puts a
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-mongoprofile'
3
- s.version = '0.1.8'
3
+ s.version = '0.1.9'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'MongoDB system.profile input plugin'
6
6
  s.description = 'MongoDB system.profile input plugin'
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.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Antonov
@@ -93,6 +93,7 @@ files:
93
93
  - LICENSE
94
94
  - README.md
95
95
  - lib/logstash/inputs/mongoprofile.rb
96
+ - lib/logstash/test.rb
96
97
  - logstash-input-mongoprofile.gemspec
97
98
  - spec/inputs/mongoprofile_spec.rb
98
99
  homepage: https://github.com/aantonovdevelop/logstash-input-mongoprofile