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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/CHANGELOG.md +7 -0
- data/bin/metrics-mongodb.rb +12 -8
- data/lib/sensu-plugins-mongodb/version.rb +1 -1
- metadata +8 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b3da65d40d2e081fdb3e6af1dcefece7ee81cd2
|
4
|
+
data.tar.gz: 3d845e43434d165ca8ac8e772cd66d2c853bb4c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c24c74cd1d0d7f7d507d4dab3ba692437f5b155e43470c8cc25ef2dc4784f4500a8cd715f6bf6960bd42e6ca401df31a3ed5a22ae4331e8d5df70f0782fefb1
|
7
|
+
data.tar.gz: 4089493a5438f92ee157f4966a886d4a9474b306a595d99707e42b5a4ddec20979663111d73951ad8d2364c7263bf5c474d388513d55524fb41b67d8b0312861
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
���JCӎ��F��hn���~�
|
2
|
+
_�jv���A87>�o���+���4/�c��.i���C杻��&Q�N�"#���@� �+V*Z:c51}�L �;���Ss�ےaW/#�
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/bin/metrics-mongodb.rb
CHANGED
@@ -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
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
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']
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|