sensu-plugins-mongodb 0.0.7 → 0.0.8

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,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5b3da65d40d2e081fdb3e6af1dcefece7ee81cd2
4
- data.tar.gz: 3d845e43434d165ca8ac8e772cd66d2c853bb4c4
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjA2ZWU2OGIyMzA1NmU1MzYzNTU1ZDVmZjg2ZjQyOTE0MTI1YWM0NA==
5
+ data.tar.gz: !binary |-
6
+ OTg3ODdiYTA2NjA5MmNhZWMxNjI5MDNjNDI0NTE2OTczOTRmYmQ4Yw==
5
7
  SHA512:
6
- metadata.gz: 3c24c74cd1d0d7f7d507d4dab3ba692437f5b155e43470c8cc25ef2dc4784f4500a8cd715f6bf6960bd42e6ca401df31a3ed5a22ae4331e8d5df70f0782fefb1
7
- data.tar.gz: 4089493a5438f92ee157f4966a886d4a9474b306a595d99707e42b5a4ddec20979663111d73951ad8d2364c7263bf5c474d388513d55524fb41b67d8b0312861
8
+ metadata.gz: !binary |-
9
+ MDk1NWU2ZjI0YThhYjU1ZTUzNGUxZDRkMDE5NmEyYzM1NzI3MmMzMTYyODIw
10
+ NTBmOGI3YjhlYTgzYTNiM2UxZTRiNDliYWMxODY4Y2ZkN2VmNGE3MzIwOTk0
11
+ NGViODZmZDU3NDI1MjFiNDYzOWYwMWFlNDg2MGEzMDdkNjMwNjQ=
12
+ data.tar.gz: !binary |-
13
+ NGYxZmY1NTYxMGMzYzFkYWFiMWM0YTgzOWI5OWQ2ZGVmOTEyZDU5ZGY4MDg2
14
+ YzRjZmVjMmIyOTRhYjFhODEzNTQyYjAzYWJhOTU5NGU4OTQwYzUyNDQ2OTVk
15
+ ZGZhY2VjNTBiYTg3OWI0YzMzOWJmNDQyNWMxMDJmNWEyNTlmODg=
data/CHANGELOG.md CHANGED
@@ -3,7 +3,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
- ## Unreleased
6
+ ## [Unreleased]
7
+
8
+ ## [0.0.8] - 2016-03-04
9
+ ### Added
10
+ - Add a ruby wrapper script for check-mongodb.py
11
+
12
+ ### Changed
13
+ - Rubocop upgrade and cleanup
7
14
 
8
15
  ## [0.0.7] - 2015-11-12
9
16
  ### Fixed
@@ -42,7 +49,11 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
42
49
  ### Added
43
50
  - initial release
44
51
 
45
- [unreleased]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.4...HEAD
52
+ [unreleased]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.8...HEAD
53
+ [0.0.8]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.7...0.0.8
54
+ [0.0.7]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.6...0.0.7
55
+ [0.0.6]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.5...0.0.6
56
+ [0.0.5]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.4...0.0.5
46
57
  [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.3...0.0.4
47
58
  [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.2...0.0.3
48
59
  [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-mongodb/compare/0.0.1...0.0.2
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mongodb/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mongodb)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mongodb/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mongodb)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-mongodb.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-mongodb)
8
- [![Codeship Status for sensu-plugins/sensu-plugins-mongodb](https://codeship.com/projects/fb6c0ce0-dc03-0132-9f1d-025863fcc952/status?branch=master)](https://codeship.com/projects/79855)
9
8
 
10
9
  ## Functionality
11
10
 
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ bin_dir = File.expand_path(File.dirname(__FILE__))
4
+ shell_script_path = File.join(bin_dir, File.basename($PROGRAM_NAME, '.rb') + '.py')
5
+
6
+ exec shell_script_path, *ARGV
@@ -93,10 +93,10 @@ 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
+ mongo_version = server_status['version'].gsub(/[^0-9\.]/i, '') # Handle versions like "2.6.11-pre" etc
97
97
  server_metrics = {}
98
98
 
99
- server_metrics['lock.ratio'] = "#{sprintf('%.5f', server_status['globalLock']['ratio'])}" unless server_status['globalLock']['ratio'].nil?
99
+ server_metrics['lock.ratio'] = sprintf('%.5f', server_status['globalLock']['ratio']).to_s unless server_status['globalLock']['ratio'].nil?
100
100
 
101
101
  server_metrics['lock.queue.total'] = server_status['globalLock']['currentQueue']['total']
102
102
  server_metrics['lock.queue.readers'] = server_status['globalLock']['currentQueue']['readers']
@@ -107,11 +107,11 @@ class MongoDB < Sensu::Plugin::Metric::CLI::Graphite
107
107
 
108
108
  if Gem::Version.new(mongo_version) < Gem::Version.new('3.0.0')
109
109
  if server_status['indexCounters']['btree'].nil?
110
- server_metrics['indexes.missRatio'] = "#{sprintf('%.5f', server_status['indexCounters']['missRatio'])}"
110
+ server_metrics['indexes.missRatio'] = sprintf('%.5f', server_status['indexCounters']['missRatio']).to_s
111
111
  server_metrics['indexes.hits'] = server_status['indexCounters']['hits']
112
112
  server_metrics['indexes.misses'] = server_status['indexCounters']['misses']
113
113
  else
114
- server_metrics['indexes.missRatio'] = "#{sprintf('%.5f', server_status['indexCounters']['btree']['missRatio'])}"
114
+ server_metrics['indexes.missRatio'] = sprintf('%.5f', server_status['indexCounters']['btree']['missRatio']).to_s
115
115
  server_metrics['indexes.hits'] = server_status['indexCounters']['btree']['hits']
116
116
  server_metrics['indexes.misses'] = server_status['indexCounters']['btree']['misses']
117
117
  end
@@ -2,7 +2,7 @@ module SensuPluginsMongoDB
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,36 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-mongodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
14
- am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
15
- A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaMEMxEjAQBgNVBAMM
16
- CW1hdHRqb25lczEYMBYGCgmSJomT8ixkARkWCHlpZWxkYm90MRMwEQYKCZImiZPy
17
- LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTSzVYnO
18
- CLgyrIyT1mBQakArQyW8xhi6MlDqyzXHJGeERT790U6EgoBVeS4XoK0ptFZNR8Tf
19
- zko0w+Nv47TarSCgkPOaxY+mxWnAVR10dOmfeLr7huiMyps+YD56/EF2FqQ3jf/+
20
- qohENfKD91qy1ieEy+Fn7Pf74ltbNKUdkb9a9eFXQ0DQ4ip5vik7DzjQkUTj4lca
21
- k6ArwnmHX4YDhZoYtrQJ8jVktN0/+NtA40M5qkCYHNe5tUW25b/tKVYuioxG6b2Z
22
- oIzaZxRLxf6HVAWpCVRT/F5+/yjigkX4u++eYacfLGleXQzoK7BL65vHGMJygWEE
23
- 0TKGqFOrl/L0AQIDAQABo38wfTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
24
- HQ4EFgQUEf6a8Td7MrSZc8ImbLFZAENPbz0wIQYDVR0RBBowGIEWbWF0dGpvbmVz
25
- QHlpZWxkYm90LmNvbTAhBgNVHRIEGjAYgRZtYXR0am9uZXNAeWllbGRib3QuY29t
26
- MA0GCSqGSIb3DQEBBQUAA4IBAQBbzXAYA3BVGw8DZ0YYoY1VHPNEcH5qPIApmHO8
27
- rvSmuUT0yMEi7u00H/5uHRFf4LleGT/+sTdyXKsNPGT9kdRuQEgwi+vf7Zfvd8aX
28
- UF/+4VkEYf/8rV8Ere6u2QaWPgApdMV6JjKr1fAwCTd8AuGXNaWItiPPMseSQzLJ
29
- JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
30
- 8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
- HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
- -----END CERTIFICATE-----
33
- date: 2015-11-12 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2016-03-04 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
14
  name: bson
@@ -78,153 +56,151 @@ dependencies:
78
56
  name: sensu-plugin
79
57
  requirement: !ruby/object:Gem::Requirement
80
58
  requirements:
81
- - - '='
59
+ - - ~>
82
60
  - !ruby/object:Gem::Version
83
- version: 1.2.0
61
+ version: '1.2'
84
62
  type: :runtime
85
63
  prerelease: false
86
64
  version_requirements: !ruby/object:Gem::Requirement
87
65
  requirements:
88
- - - '='
66
+ - - ~>
89
67
  - !ruby/object:Gem::Version
90
- version: 1.2.0
68
+ version: '1.2'
91
69
  - !ruby/object:Gem::Dependency
92
70
  name: bundler
93
71
  requirement: !ruby/object:Gem::Requirement
94
72
  requirements:
95
- - - "~>"
73
+ - - ~>
96
74
  - !ruby/object:Gem::Version
97
75
  version: '1.7'
98
76
  type: :development
99
77
  prerelease: false
100
78
  version_requirements: !ruby/object:Gem::Requirement
101
79
  requirements:
102
- - - "~>"
80
+ - - ~>
103
81
  - !ruby/object:Gem::Version
104
82
  version: '1.7'
105
83
  - !ruby/object:Gem::Dependency
106
84
  name: codeclimate-test-reporter
107
85
  requirement: !ruby/object:Gem::Requirement
108
86
  requirements:
109
- - - "~>"
87
+ - - ~>
110
88
  - !ruby/object:Gem::Version
111
89
  version: '0.4'
112
90
  type: :development
113
91
  prerelease: false
114
92
  version_requirements: !ruby/object:Gem::Requirement
115
93
  requirements:
116
- - - "~>"
94
+ - - ~>
117
95
  - !ruby/object:Gem::Version
118
96
  version: '0.4'
119
97
  - !ruby/object:Gem::Dependency
120
98
  name: github-markup
121
99
  requirement: !ruby/object:Gem::Requirement
122
100
  requirements:
123
- - - "~>"
101
+ - - ~>
124
102
  - !ruby/object:Gem::Version
125
103
  version: '1.3'
126
104
  type: :development
127
105
  prerelease: false
128
106
  version_requirements: !ruby/object:Gem::Requirement
129
107
  requirements:
130
- - - "~>"
108
+ - - ~>
131
109
  - !ruby/object:Gem::Version
132
110
  version: '1.3'
133
111
  - !ruby/object:Gem::Dependency
134
112
  name: pry
135
113
  requirement: !ruby/object:Gem::Requirement
136
114
  requirements:
137
- - - "~>"
115
+ - - ~>
138
116
  - !ruby/object:Gem::Version
139
117
  version: '0.10'
140
118
  type: :development
141
119
  prerelease: false
142
120
  version_requirements: !ruby/object:Gem::Requirement
143
121
  requirements:
144
- - - "~>"
122
+ - - ~>
145
123
  - !ruby/object:Gem::Version
146
124
  version: '0.10'
147
125
  - !ruby/object:Gem::Dependency
148
126
  name: rake
149
127
  requirement: !ruby/object:Gem::Requirement
150
128
  requirements:
151
- - - "~>"
129
+ - - ~>
152
130
  - !ruby/object:Gem::Version
153
131
  version: '10.0'
154
132
  type: :development
155
133
  prerelease: false
156
134
  version_requirements: !ruby/object:Gem::Requirement
157
135
  requirements:
158
- - - "~>"
136
+ - - ~>
159
137
  - !ruby/object:Gem::Version
160
138
  version: '10.0'
161
139
  - !ruby/object:Gem::Dependency
162
140
  name: redcarpet
163
141
  requirement: !ruby/object:Gem::Requirement
164
142
  requirements:
165
- - - "~>"
143
+ - - ~>
166
144
  - !ruby/object:Gem::Version
167
145
  version: '3.2'
168
146
  type: :development
169
147
  prerelease: false
170
148
  version_requirements: !ruby/object:Gem::Requirement
171
149
  requirements:
172
- - - "~>"
150
+ - - ~>
173
151
  - !ruby/object:Gem::Version
174
152
  version: '3.2'
175
153
  - !ruby/object:Gem::Dependency
176
154
  name: rspec
177
155
  requirement: !ruby/object:Gem::Requirement
178
156
  requirements:
179
- - - "~>"
157
+ - - ~>
180
158
  - !ruby/object:Gem::Version
181
159
  version: '3.1'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
163
  requirements:
186
- - - "~>"
164
+ - - ~>
187
165
  - !ruby/object:Gem::Version
188
166
  version: '3.1'
189
167
  - !ruby/object:Gem::Dependency
190
168
  name: rubocop
191
169
  requirement: !ruby/object:Gem::Requirement
192
170
  requirements:
193
- - - '='
171
+ - - ~>
194
172
  - !ruby/object:Gem::Version
195
- version: 0.32.1
173
+ version: '0.37'
196
174
  type: :development
197
175
  prerelease: false
198
176
  version_requirements: !ruby/object:Gem::Requirement
199
177
  requirements:
200
- - - '='
178
+ - - ~>
201
179
  - !ruby/object:Gem::Version
202
- version: 0.32.1
180
+ version: '0.37'
203
181
  - !ruby/object:Gem::Dependency
204
182
  name: yard
205
183
  requirement: !ruby/object:Gem::Requirement
206
184
  requirements:
207
- - - "~>"
185
+ - - ~>
208
186
  - !ruby/object:Gem::Version
209
187
  version: '0.8'
210
188
  type: :development
211
189
  prerelease: false
212
190
  version_requirements: !ruby/object:Gem::Requirement
213
191
  requirements:
214
- - - "~>"
192
+ - - ~>
215
193
  - !ruby/object:Gem::Version
216
194
  version: '0.8'
217
- description: |-
218
- This plugin provides native MongoDB
219
- instrumentation for monitoring and metrics
220
- collection, including: service health, database
221
- connectivity, replication lag/status, `oplog`
222
- monitoring, collection-specific metrics, and
223
- more.
224
- email: "<sensu-users@googlegroups.com>"
195
+ description: ! "This plugin provides native MongoDB\n instrumentation
196
+ for monitoring and metrics\n collection, including:
197
+ service health, database\n connectivity, replication
198
+ lag/status, `oplog`\n monitoring, collection-specific
199
+ metrics, and\n more."
200
+ email: <sensu-users@googlegroups.com>
225
201
  executables:
202
+ - check-mongodb.rb
226
203
  - metrics-mongodb.rb
227
- - check-mongodb.py
228
204
  extensions: []
229
205
  extra_rdoc_files: []
230
206
  files:
@@ -232,6 +208,7 @@ files:
232
208
  - LICENSE
233
209
  - README.md
234
210
  - bin/check-mongodb.py
211
+ - bin/check-mongodb.rb
235
212
  - bin/metrics-mongodb.rb
236
213
  - lib/sensu-plugins-mongodb.rb
237
214
  - lib/sensu-plugins-mongodb/version.rb
@@ -251,17 +228,17 @@ require_paths:
251
228
  - lib
252
229
  required_ruby_version: !ruby/object:Gem::Requirement
253
230
  requirements:
254
- - - ">="
231
+ - - ! '>='
255
232
  - !ruby/object:Gem::Version
256
233
  version: 1.9.3
257
234
  required_rubygems_version: !ruby/object:Gem::Requirement
258
235
  requirements:
259
- - - ">="
236
+ - - ! '>='
260
237
  - !ruby/object:Gem::Version
261
238
  version: '0'
262
239
  requirements: []
263
240
  rubyforge_project:
264
- rubygems_version: 2.4.8
241
+ rubygems_version: 2.4.5
265
242
  signing_key:
266
243
  specification_version: 4
267
244
  summary: Sensu plugins for mongodb
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- ���JCӎ��F��hn���~�
2
- _�jv���A87>�o���+���4/�c��.i���C杻��&Q�N�"#���@� �+V*Z:c51}�L �;���Ss�ےaW/#�
metadata.gz.sig DELETED
Binary file