riemann-mongodb 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjJjZmQ4ZTk3ZTc0NDkyYjIzMzU1YjEwYWUwNzI5OTQzZjA1MjI2Zg==
4
+ NjBjNGJkYzQwOTI3YjhlZDU2ZWE3YjUwOWRiNGJmZmQyY2UxNWQyNQ==
5
5
  data.tar.gz: !binary |-
6
- NDAyNWIxMWY0M2RmNzAyYzY0MzI5YjE4YWUzMGFmMWM5YjYzZWFiNA==
6
+ ZDFlYzFkMzE4ODUzYzI5MmMxZWYzYjlhYWM1YmVkNzJjMmJkYTFkOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTYxZTMyODMwMmEzMzUwMWE2OGY2MmE5ODlmMmY0YWIzMDkzMzE4NGYwMWU1
10
- ZTE0YWY2MzU4MmUxYWUwMmYzNzhmNDE2OWQ4Y2I1M2MzN2U5YWZiOTU1ODIz
11
- M2ZlMDExOTQxMzNhZmZjNTkyNDUxYTc0M2FiZjQ1MjY2ODk4MDI=
9
+ YjBlM2Q1YjZiMDNiYTI3ZTg0MmFmZjQ0ODIzZThkOWM0MWZkNjZmNTdjNTY1
10
+ MTJjYWJlNDVjN2NlYjIwMjkxNzZmMmY3Y2UwNjY3ZjU5N2U0ZDgzOWNiNzNm
11
+ NWNhNDk2ZTJmMmFlNjAzOTk2ODVkYTVlODRlYjZlMTg0ZmE4MmU=
12
12
  data.tar.gz: !binary |-
13
- YjY0OGMwYTM0ZjZmYWRlZjZhYWQ5MWY3ODA2ZjEyNmUzYzk0NmMzMWI5OGJj
14
- MmE0N2VhMjQ3MjAyYTVkN2ZiZGU5N2E1NjkwMjE4NDE1ODc1NDM0YWFlMDdj
15
- ZmM2NjU3ZmFiYWQzMzc5MjgyODM0ZDVlNjM3ZjllNTJhNzQxZGM=
13
+ MTgxMzIxNWVlYjkyYmJjNGMxMWQyODVhNTJhZmIwZTExOTI0MTcyMjc5NDA3
14
+ ZTFhM2Q5MjJiNWM0M2E3YTRmMWNmODEyNTVmNTk0Yzc1YTk3MDllZWQ4MGJm
15
+ YTJmY2NlOTA2MzI3ZDgzOTI4NGU5YzdkZDZjYTUzYjQ4NWM2NmM=
data/bin/riemann-mongodb CHANGED
@@ -11,9 +11,12 @@ class Riemann::Tools::Mongo
11
11
  opt :mongo_host, "Mongo hostname", :default => 'localhost'
12
12
  opt :mongo_port, "Mongo port", :default => 27017
13
13
  opt :mongo_db, "Mongo database", :default => 'local'
14
+ opt :mongo_user, "Mongo user for authentication", :default => ''
15
+ opt :mongo_pass, "Mongo password for authentication", :default => ''
14
16
 
15
17
  def initialize
16
18
  @db = ::Mongo::MongoClient.new(opts[:mongo_host], opts[:mongo_port]).db(opts[:mongo_db])
19
+ @db.authenticate(opts[:mongo_user], opts[:mongo_pass]) unless opts[:mongo_user].empty? || opts[:mongo_pass].empty?
17
20
  end
18
21
 
19
22
  def tick
@@ -12,9 +12,12 @@ class Riemann::Tools::Mongo
12
12
  opt :mongo_host, "Mongo hostname", :default => 'localhost'
13
13
  opt :mongo_port, "Mongo port", :default => 27017
14
14
  opt :mongo_db, "Mongo database", :default => 'admin'
15
+ opt :mongo_user, "Mongo user for authentication", :default => ''
16
+ opt :mongo_pass, "Mongo password for authentication", :default => ''
15
17
 
16
18
  def initialize
17
19
  @db = ::Mongo::MongoClient.new(opts[:mongo_host], opts[:mongo_port]).db(opts[:mongo_db])
20
+ @db.authenticate(opts[:mongo_user], opts[:mongo_pass]) unless opts[:mongo_user].empty? || opts[:mongo_pass].empty?
18
21
  @cmd = {"replSetGetStatus"=>1}
19
22
  end
20
23
 
@@ -11,10 +11,13 @@ class Riemann::Tools::Mongo
11
11
  opt :mongo_host, "Mongo hostname", :default => 'localhost'
12
12
  opt :mongo_port, "Mongo port", :default => 27017
13
13
  opt :mongo_db, "Mongo database", :default => 'local'
14
+ opt :mongo_user, "Mongo user for authentication", :default => ''
15
+ opt :mongo_pass, "Mongo password for authentication", :default => ''
14
16
 
15
17
  def initialize
16
- @db = ::Mongo::MongoClient.new(opts[:mongo_host], opts[:mongo_port]).db(opts[:mongo_db])
17
- @cmd = {"serverStatus"=>1}
18
+ @db = ::Mongo::MongoClient.new(opts[:mongo_host], opts[:mongo_port]).db(opts[:mongo_db])
19
+ @db.authenticate(opts[:mongo_user], opts[:mongo_pass]) unless opts[:mongo_user].empty? || opts[:mongo_pass].empty?
20
+ @cmd = {"serverStatus"=>1}
18
21
  end
19
22
 
20
23
  def tick
@@ -49,4 +52,4 @@ class Riemann::Tools::Mongo
49
52
  end
50
53
  end
51
54
 
52
- Riemann::Tools::Mongo.run
55
+ Riemann::Tools::Mongo.run
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-mongodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fede Borgnia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riemann-tools
@@ -55,9 +55,9 @@ dependencies:
55
55
  description:
56
56
  email: fborgnia@gmail.com
57
57
  executables:
58
+ - riemann-mongodb-serverstatus
58
59
  - riemann-mongodb
59
60
  - riemann-mongodb-rs-status
60
- - riemann-mongodb-serverstatus
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  requirements: []
85
85
  rubyforge_project: riemann-mongodb
86
- rubygems_version: 2.4.5
86
+ rubygems_version: 2.5.1
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: MongoDB clients to submits metrics to Riemann.