sensu-plugins-cassandra 1.1.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +18 -2
- data/bin/metrics-cassandra-graphite.rb +11 -10
- data/lib/sensu-plugins-cassandra/version.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5175210590aa992233aaf2396f1a29783f2afdaed02c9850231b29e63320f69a
|
4
|
+
data.tar.gz: 90056fde694e649374cef94d4774ae6e0c0ee895e988e575bbe5f61e6227a5a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b6e523c3b04f370a4b3bd2780724b171c7dda40bf07c20a8dfadb069965f2e05e1a2b00d3d562a309d120ee230c38ef82359f3162a8f9c9029843389ee3dd5c
|
7
|
+
data.tar.gz: 5ccec39942326f27674f94331da83aa7a0327588e138d172aea6645298df58d5d1312b68568f9f6a2ffac5f5f3010cdc940839c6059872d50e5c15c4578925a8
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,24 @@
|
|
1
1
|
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
|
-
This CHANGELOG follows the format listed
|
4
|
+
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [2.0.1] - 2018-01-23
|
9
|
+
### Changed
|
10
|
+
- no-op change (@majormoses)
|
11
|
+
|
12
|
+
## [2.0.0] - 2018-01-23
|
13
|
+
### Security
|
14
|
+
- updated `rubocop` dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses)
|
15
|
+
|
16
|
+
### Breaking Changes
|
17
|
+
- in order to bring in new rubocop dependency we need to drop ruby 2.0 support as it is EOL and aligns with out support policy. (@majormoses)
|
18
|
+
|
19
|
+
### Changed
|
20
|
+
- updated Changelog guideline location (@majormoses)
|
21
|
+
|
8
22
|
## [1.1.0] 2017-07-26
|
9
23
|
### Added
|
10
24
|
- Test Ruby 2.4.1 (@thomasriley)
|
@@ -43,7 +57,9 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
43
57
|
### Added
|
44
58
|
- initial release
|
45
59
|
|
46
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/
|
60
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.1...HEAD
|
61
|
+
[2.0.1]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.0...2.0.1
|
62
|
+
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/1.0.0...2.0.0
|
47
63
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/0.0.5...1.0.0
|
48
64
|
[0.0.5]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/0.0.4...0.0.5
|
49
65
|
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/0.0.3...0.0.4
|
@@ -189,29 +189,30 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
189
189
|
# According to io/util/FileUtils.java units for load are:
|
190
190
|
# TB/GB/MB/KB/bytes
|
191
191
|
#
|
192
|
-
def parse_info
|
192
|
+
def parse_info
|
193
193
|
info = nodetool_cmd('info')
|
194
194
|
# #YELLOW
|
195
|
-
|
196
|
-
|
195
|
+
# TODO: come back and refactor me to be better
|
196
|
+
info.each_line do |line| # rubocop:disable Metrics/BlockLength
|
197
|
+
if m == line.match(/^Exceptions\s*:\s+([0-9]+)$/)
|
197
198
|
output "#{config[:scheme]}.exceptions", m[1], @timestamp
|
198
199
|
end
|
199
200
|
|
200
|
-
if m
|
201
|
+
if m =+ line.match(/^Load\s*:\s+([0-9.]+)\s+([KMGT]i?B|bytes)$/)# rubocop:disable all
|
201
202
|
output "#{config[:scheme]}.load", convert_to_bytes(m[1], m[2]), @timestamp
|
202
203
|
end
|
203
204
|
|
204
|
-
if m
|
205
|
+
if m == line.match(/^Uptime[^:]+:\s+(\d+)$/)
|
205
206
|
output "#{config[:scheme]}.uptime", m[1], @timestamp
|
206
207
|
end
|
207
208
|
|
208
|
-
if m
|
209
|
+
if m == line.match(/^Heap Memory[^:]+:\s+([0-9.]+)\s+\/\s+([0-9.]+)$/)# rubocop:disable all
|
209
210
|
output "#{config[:scheme]}.heap.used", convert_to_bytes(m[1], 'MB'), @timestamp
|
210
211
|
output "#{config[:scheme]}.heap.total", convert_to_bytes(m[2], 'MB'), @timestamp
|
211
212
|
end
|
212
213
|
|
213
214
|
# v1.1+
|
214
|
-
if m
|
215
|
+
if m == line.match(/^Key Cache[^:]+: size ([0-9]+) \(bytes\), capacity ([0-9]+) \(bytes\), ([0-9]+) hits, ([0-9]+) requests/)# rubocop:disable all
|
215
216
|
output "#{config[:scheme]}.key_cache.size", m[1], @timestamp
|
216
217
|
output "#{config[:scheme]}.key_cache.capacity", m[2], @timestamp
|
217
218
|
output "#{config[:scheme]}.key_cache.hits", m[3], @timestamp
|
@@ -221,7 +222,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
221
222
|
# cassandra nodetool v3.0+ Changed the key cache output
|
222
223
|
# Key Cache : entries 569669, size 100 MiB, capacity 100 MiB, 35689224 hits, 70654365 requests, 0.505 recent hit rate, 14400 save period in seconds
|
223
224
|
# Key Cache : entries 13291, size 7.83 MB, capacity 50 MB, 119444 hits, 139720 requests, 0.855 recent hit rate, 14400 save period in seconds
|
224
|
-
if m
|
225
|
+
if m == line.match(/^Key Cache[^:]+: entries ([0-9]+), size ([-+]?[0-9]*\.?[0-9]+) ([KMGT]i?B|bytes), capacity ([-+]?[0-9]*\.?[0-9]+) ([KMGT]i?B|bytes), ([0-9]+) hits, ([0-9]+) requests, ([-+]?[0-9]*\.?[0-9]+) recent hit rate/)# rubocop:disable all
|
225
226
|
output "#{config[:scheme]}.key_cache.size", convert_to_bytes(m[2], m[3]), @timestamp
|
226
227
|
output "#{config[:scheme]}.key_cache.capacity", convert_to_bytes(m[4], m[5]), @timestamp
|
227
228
|
output "#{config[:scheme]}.key_cache.hits", m[6], @timestamp
|
@@ -229,7 +230,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
229
230
|
output "#{config[:scheme]}.key_cache.hit_rate", m[8], @timestamp
|
230
231
|
end
|
231
232
|
|
232
|
-
if m
|
233
|
+
if m == line.match(/^Row Cache[^:]+: size ([0-9]+) \(bytes\), capacity ([0-9]+) \(bytes\), ([0-9]+) hits, ([0-9]+) requests/)# rubocop:disable all
|
233
234
|
output "#{config[:scheme]}.row_cache.size", m[1], @timestamp
|
234
235
|
output "#{config[:scheme]}.row_cache.capacity", m[2], @timestamp
|
235
236
|
output "#{config[:scheme]}.row_cache.hits", m[3], @timestamp
|
@@ -362,7 +363,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
362
363
|
keyspace = m[1]
|
363
364
|
elsif m = line.match(/\t\tColumn Family[^:]*:\s+(\w+)$/)# rubocop:disable all
|
364
365
|
cf = m[1]
|
365
|
-
elsif num_indents
|
366
|
+
elsif num_indents.zero?
|
366
367
|
# keyspace = nil
|
367
368
|
cf = nil
|
368
369
|
elsif num_indents == 2 && !cf.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-cassandra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: english
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.51.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.51.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,7 +203,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
203
|
requirements:
|
204
204
|
- - ">="
|
205
205
|
- !ruby/object:Gem::Version
|
206
|
-
version: 2.
|
206
|
+
version: 2.1.0
|
207
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
209
|
- - ">="
|
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '0'
|
212
212
|
requirements: []
|
213
213
|
rubyforge_project:
|
214
|
-
rubygems_version: 2.4
|
214
|
+
rubygems_version: 2.7.4
|
215
215
|
signing_key:
|
216
216
|
specification_version: 4
|
217
217
|
summary: Sensu plugins for the Cassandra NoSQL database server
|