sensu-plugins-cassandra 2.0.1 → 2.0.2

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,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5175210590aa992233aaf2396f1a29783f2afdaed02c9850231b29e63320f69a
4
- data.tar.gz: 90056fde694e649374cef94d4774ae6e0c0ee895e988e575bbe5f61e6227a5a4
3
+ metadata.gz: 332772ae3028b9468b77a0d851ce74748d80b8f02692ec14054bda5e46c50f2a
4
+ data.tar.gz: 47acbff735933539840bfa3655f614ccbd7aa1d9d345f2b90b65d8a2388104b7
5
5
  SHA512:
6
- metadata.gz: 5b6e523c3b04f370a4b3bd2780724b171c7dda40bf07c20a8dfadb069965f2e05e1a2b00d3d562a309d120ee230c38ef82359f3162a8f9c9029843389ee3dd5c
7
- data.tar.gz: 5ccec39942326f27674f94331da83aa7a0327588e138d172aea6645298df58d5d1312b68568f9f6a2ffac5f5f3010cdc940839c6059872d50e5c15c4578925a8
6
+ metadata.gz: 0f85329ed4b1887e2c3bbdf6bd5cab89d7fcd1c20c58f31be631f8482706a41838bb86b0cfad819c4ae11a358bb89af556e795f94f0bf5f66e6d02c3e450e022
7
+ data.tar.gz: 4cd69681c97dc943b52f0a8fc8b8fbbbfb63116a5ee00abbfa9e6fefa0f7e28dbd42fd04d4378800d46202c1c4c8e999c5ed5f4d7027d4099448490b03fe3708
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.0.2] - 2018-01-25
9
+ ### Fixed
10
+ - metrics-cassandra-graphite.rb: fixed conditional assignments broken by agressive rubocop rule fix and following the instructions during a demo (@majormoses)
11
+
8
12
  ## [2.0.1] - 2018-01-23
9
13
  ### Changed
10
14
  - no-op change (@majormoses)
@@ -57,7 +61,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
57
61
  ### Added
58
62
  - initial release
59
63
 
60
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.1...HEAD
64
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.2...HEAD
65
+ [2.0.2]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.1...2.0.2
61
66
  [2.0.1]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.0...2.0.1
62
67
  [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/1.0.0...2.0.0
63
68
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/0.0.5...1.0.0
@@ -194,25 +194,25 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
194
194
  # #YELLOW
195
195
  # TODO: come back and refactor me to be better
196
196
  info.each_line do |line| # rubocop:disable Metrics/BlockLength
197
- if m == line.match(/^Exceptions\s*:\s+([0-9]+)$/)
197
+ if (m = line.match(/^Exceptions\s*:\s+([0-9]+)$/))
198
198
  output "#{config[:scheme]}.exceptions", m[1], @timestamp
199
199
  end
200
200
 
201
- if m =+ line.match(/^Load\s*:\s+([0-9.]+)\s+([KMGT]i?B|bytes)$/)# rubocop:disable all
201
+ if (m = line.match(/^Load\s*:\s+([0-9.]+)\s+([KMGT]i?B|bytes)$/))
202
202
  output "#{config[:scheme]}.load", convert_to_bytes(m[1], m[2]), @timestamp
203
203
  end
204
204
 
205
- if m == line.match(/^Uptime[^:]+:\s+(\d+)$/)
205
+ if (m = line.match(/^Uptime[^:]+:\s+(\d+)$/))
206
206
  output "#{config[:scheme]}.uptime", m[1], @timestamp
207
207
  end
208
208
 
209
- if m == line.match(/^Heap Memory[^:]+:\s+([0-9.]+)\s+\/\s+([0-9.]+)$/)# rubocop:disable all
209
+ if (m = line.match(/^Heap Memory[^:]+:\s+([0-9.]+)\s+\/\s+([0-9.]+)$/))
210
210
  output "#{config[:scheme]}.heap.used", convert_to_bytes(m[1], 'MB'), @timestamp
211
211
  output "#{config[:scheme]}.heap.total", convert_to_bytes(m[2], 'MB'), @timestamp
212
212
  end
213
213
 
214
214
  # v1.1+
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
+ if (m = line.match(/^Key Cache[^:]+: size ([0-9]+) \(bytes\), capacity ([0-9]+) \(bytes\), ([0-9]+) hits, ([0-9]+) requests/))
216
216
  output "#{config[:scheme]}.key_cache.size", m[1], @timestamp
217
217
  output "#{config[:scheme]}.key_cache.capacity", m[2], @timestamp
218
218
  output "#{config[:scheme]}.key_cache.hits", m[3], @timestamp
@@ -222,7 +222,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
222
222
  # cassandra nodetool v3.0+ Changed the key cache output
223
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
224
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
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
+ 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 Metrics/LineLength
226
226
  output "#{config[:scheme]}.key_cache.size", convert_to_bytes(m[2], m[3]), @timestamp
227
227
  output "#{config[:scheme]}.key_cache.capacity", convert_to_bytes(m[4], m[5]), @timestamp
228
228
  output "#{config[:scheme]}.key_cache.hits", m[6], @timestamp
@@ -230,7 +230,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
230
230
  output "#{config[:scheme]}.key_cache.hit_rate", m[8], @timestamp
231
231
  end
232
232
 
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
+ if (m = line.match(/^Row Cache[^:]+: size ([0-9]+) \(bytes\), capacity ([0-9]+) \(bytes\), ([0-9]+) hits, ([0-9]+) requests/))
234
234
  output "#{config[:scheme]}.row_cache.size", m[1], @timestamp
235
235
  output "#{config[:scheme]}.row_cache.capacity", m[2], @timestamp
236
236
  output "#{config[:scheme]}.row_cache.hits", m[3], @timestamp
@@ -2,7 +2,7 @@ module SensuPluginsCassandra
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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: 2.0.1
4
+ version: 2.0.2
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: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: english