sensu-plugins-mongodb 0.0.6 → 0.0.7

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: 0c77f96e9ed54c0ebae93b22ef9d2c3ba3b31f6c
4
- data.tar.gz: af8a77dffb87f0e09221a0156b5ea0a93074d481
3
+ metadata.gz: 5b3da65d40d2e081fdb3e6af1dcefece7ee81cd2
4
+ data.tar.gz: 3d845e43434d165ca8ac8e772cd66d2c853bb4c4
5
5
  SHA512:
6
- metadata.gz: 09d393f5829685dd5c9fd9143af1f87b67c74e7d836e7608f9353cf09d6c90fffb1b3e79c01888d22fb64bc1d1917eb5b601527e3abb05f6c0b498fb131e5084
7
- data.tar.gz: 4108df7689502003b4b00662e46508d08c913c90ab0f6bc2dddf07d5fe479e3a50f83164060323c21032480c84075faf27301aa7ae87d721e17e8a3537f03167
6
+ metadata.gz: 3c24c74cd1d0d7f7d507d4dab3ba692437f5b155e43470c8cc25ef2dc4784f4500a8cd715f6bf6960bd42e6ca401df31a3ed5a22ae4331e8d5df70f0782fefb1
7
+ data.tar.gz: 4089493a5438f92ee157f4966a886d4a9474b306a595d99707e42b5a4ddec20979663111d73951ad8d2364c7263bf5c474d388513d55524fb41b67d8b0312861
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- x�z��C��A� /w} h�^�x.R�׵��Z���ɥu��~x�S'\m�iR��}ɢq�?��QJ�[RQ7���m�{���b�r^yx�YP��-p�V� �{=�F�Ԉ�<p��B�E亙4��2.��/~o�hg����������*l_�� ��Z�9��(����b6Jp�4��赪�w�]ꬴ+ZiE�[A�V�(���9mZ$;�ىP�`f��oz�
1
+ ���JCӎ��F��hn���~�
2
+ _�jv���A87>�o���+���4/�c��.i���C杻��&Q�N�"#���@� �+V*Z:c51}�L �;���Ss�ےaW/#�
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## [0.0.7] - 2015-11-12
9
+ ### Fixed
10
+ - Stopped trying to gather indexCounters data from mongo 3 (metrics-mongodb.rb)
11
+
12
+ ### Changed
13
+ - Updated mongo gem to 1.12.3
14
+
8
15
  ## [0.0.6] - 2015-10-13
9
16
  ### Fixed
10
17
  - Rename option to avoid naming conflict with class variable name
@@ -93,7 +93,9 @@ class MongoDB < Sensu::Plugin::Metric::CLI::Graphite
93
93
  end
94
94
 
95
95
  def gather_replication_metrics(server_status)
96
+ mongo_version = server_status['version'].gsub(/[^0-9\.]/i, '') # Handle versions like "2.6.11-pre" etc
96
97
  server_metrics = {}
98
+
97
99
  server_metrics['lock.ratio'] = "#{sprintf('%.5f', server_status['globalLock']['ratio'])}" unless server_status['globalLock']['ratio'].nil?
98
100
 
99
101
  server_metrics['lock.queue.total'] = server_status['globalLock']['currentQueue']['total']
@@ -103,14 +105,16 @@ class MongoDB < Sensu::Plugin::Metric::CLI::Graphite
103
105
  server_metrics['connections.current'] = server_status['connections']['current']
104
106
  server_metrics['connections.available'] = server_status['connections']['available']
105
107
 
106
- if server_status['indexCounters']['btree'].nil?
107
- server_metrics['indexes.missRatio'] = "#{sprintf('%.5f', server_status['indexCounters']['missRatio'])}"
108
- server_metrics['indexes.hits'] = server_status['indexCounters']['hits']
109
- server_metrics['indexes.misses'] = server_status['indexCounters']['misses']
110
- else
111
- server_metrics['indexes.missRatio'] = "#{sprintf('%.5f', server_status['indexCounters']['btree']['missRatio'])}"
112
- server_metrics['indexes.hits'] = server_status['indexCounters']['btree']['hits']
113
- server_metrics['indexes.misses'] = server_status['indexCounters']['btree']['misses']
108
+ if Gem::Version.new(mongo_version) < Gem::Version.new('3.0.0')
109
+ if server_status['indexCounters']['btree'].nil?
110
+ server_metrics['indexes.missRatio'] = "#{sprintf('%.5f', server_status['indexCounters']['missRatio'])}"
111
+ server_metrics['indexes.hits'] = server_status['indexCounters']['hits']
112
+ server_metrics['indexes.misses'] = server_status['indexCounters']['misses']
113
+ else
114
+ server_metrics['indexes.missRatio'] = "#{sprintf('%.5f', server_status['indexCounters']['btree']['missRatio'])}"
115
+ server_metrics['indexes.hits'] = server_status['indexCounters']['btree']['hits']
116
+ server_metrics['indexes.misses'] = server_status['indexCounters']['btree']['misses']
117
+ end
114
118
  end
115
119
 
116
120
  server_metrics['cursors.open'] = server_status['cursors']['totalOpen']
@@ -2,7 +2,7 @@ module SensuPluginsMongoDB
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 6
5
+ PATCH = 7
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-mongodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-10-13 00:00:00.000000000 Z
33
+ date: 2015-11-12 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: bson
@@ -38,42 +38,42 @@ dependencies:
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 1.9.2
41
+ version: 1.12.3
42
42
  type: :runtime
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 1.9.2
48
+ version: 1.12.3
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: bson_ext
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 1.9.2
55
+ version: 1.12.3
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - '='
61
61
  - !ruby/object:Gem::Version
62
- version: 1.9.2
62
+ version: 1.12.3
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: mongo
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: 1.9.2
69
+ version: 1.12.3
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: 1.9.2
76
+ version: 1.12.3
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: sensu-plugin
79
79
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file