sensu-plugins-cassandra 2.1.0 → 3.0.0

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: 1a336e5efa785f31b5ab636f723dc38b2affccc07dd3770b3774372a2391df9d
4
- data.tar.gz: d765b454aea378392de15d4e96e0f92c051d566a6685e6199c7ed0f6458eb168
3
+ metadata.gz: 40b659004dfe25d35fb353d9590464be6a5996ba37cd41b4b6f3fb171c1b1232
4
+ data.tar.gz: c22c1ae94208d57d757d41477ed0bb0aadbeff00b00a268215e084df8b18adb5
5
5
  SHA512:
6
- metadata.gz: 8877d02a82239b29647861b52210ca36e3b4adf73f9f5ec2e71e0f32f122b43981b57350e2ac56e329d3dd7b68cab5734193f4eb12ef28ad8bf2ef8f4ce82801
7
- data.tar.gz: 80211b68feb8fb6bc2d551f7b114ef5fffd5960ad1eefd36f421127b8504763135d131d13177dc79a139650e2cbd5343766dad2e0f55e343cf732b4979d726e3
6
+ metadata.gz: b75435763bcbb1e4757685b2dd87148c970fc3e5cb2985b9267bfe2d23b6490515322e00ba2be68b30cfd53295d9d0a425b838b8b9485836bfdd0f6a48fa9a07
7
+ data.tar.gz: 9dd068db1a9fe080a36122e8663b881ca784d314d9b9263961d849beabd51f1206471819c777c0683801263b91f5e3a6d7f842f631f992b1405d7ddac7b609f8
data/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [3.0.0] - 2020-05-12
9
+ ### Breaking Changes
10
+ - Update minimum required ruby version to 2.3. Drop unsupported ruby versions.
11
+ - Bump `sensu-plugin` dependency to `~> 4.0`
12
+
13
+ ### Added
14
+ - Bonsai asset support
15
+
16
+ ### Changed
17
+ - Updated english dependency to '0.7.0'
18
+ - Updated bundler dependency to '~> 2.1'
19
+ - Updated rubocop dependency to '~> 0.81.0'
20
+ - Remediated rubocop issues
21
+ - Updated rake dependency to '~> 13.0'
22
+ - Update codeclimate-test-reporter to '~> 1.0'
23
+ - metrics-cassandra-graphite.rb: Added support for Row Cache in Cassandra 3.0+
24
+
8
25
  ## [2.1.0] - 2019-03-04
9
26
  ### Added
10
27
  - metrics-cassandra-graphite.rb: Earlier versions of nodetool incorrectly append a `.` to the `ms` SI unit. In newer versions where this has been corrected, the missing `.` failed to match causing a missed `chomp` operation. (@zenmetsu)
@@ -68,7 +85,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
68
85
  ### Added
69
86
  - initial release
70
87
 
71
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.1.0...HEAD
88
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/3.0.0...HEAD
89
+ [3.0.0]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.1.0...3.0.0
72
90
  [2.1.0]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.2...2.1.0
73
91
  [2.0.2]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.1...2.0.2
74
92
  [2.0.1]: https://github.com/sensu-plugins/sensu-plugins-cassandra/compare/2.0.0...2.0.1
@@ -1,4 +1,6 @@
1
1
  #! /usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # check-cassandra-schema
4
6
  #
@@ -68,14 +70,14 @@ class CheckCassandraSchema < Sensu::Plugin::Check::CLI
68
70
  bad_nodes << m[2]
69
71
  next
70
72
  end
71
- if bad_nodes.count > 0
73
+ if bad_nodes.count > 0 # rubocop: disable Style/NumericPredicate
72
74
  if m = line.match(/\s+(.*)\[(.*)\]\s+$/)# rubocop:disable all
73
75
  bad_nodes << m[2]
74
76
  end
75
77
  end
76
78
  end
77
79
 
78
- if bad_nodes.count > 0
80
+ if bad_nodes.count > 0 # rubocop: disable Style/NumericPredicate
79
81
  critical('nodes ' + bad_nodes.join(', ') + ' are in schema disagreement')
80
82
  else
81
83
  ok
@@ -1,4 +1,6 @@
1
1
  #! /usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # cassandra-graphite
4
6
  #
@@ -222,7 +224,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
222
224
  # cassandra nodetool v3.0+ Changed the key cache output
223
225
  # 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
226
  # 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 Metrics/LineLength
227
+ 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 Layout/LineLength
226
228
  output "#{config[:scheme]}.key_cache.size", convert_to_bytes(m[2], m[3]), @timestamp
227
229
  output "#{config[:scheme]}.key_cache.capacity", convert_to_bytes(m[4], m[5]), @timestamp
228
230
  output "#{config[:scheme]}.key_cache.hits", m[6], @timestamp
@@ -236,6 +238,17 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
236
238
  output "#{config[:scheme]}.row_cache.hits", m[3], @timestamp
237
239
  output "#{config[:scheme]}.row_cache.requests", m[4], @timestamp
238
240
  end
241
+
242
+ # cassandra nodetool v3.0+ Changed the row cache output
243
+ # Row Cache : entries 569669, size 100 MiB, capacity 100 MiB, 35689224 hits, 70654365 requests, 0.505 recent hit rate, 14400 save period in seconds
244
+ # Row Cache : entries 13291, size 7.83 MB, capacity 50 MB, 119444 hits, 139720 requests, 0.855 recent hit rate, 14400 save period in seconds
245
+ if (m = line.match(/^Row 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 Layout/LineLength
246
+ output "#{config[:scheme]}.row_cache.size", convert_to_bytes(m[2], m[3]), @timestamp
247
+ output "#{config[:scheme]}.row_cache.capacity", convert_to_bytes(m[4], m[5]), @timestamp
248
+ output "#{config[:scheme]}.row_cache.hits", m[6], @timestamp
249
+ output "#{config[:scheme]}.row_cache.requests", m[7], @timestamp
250
+ output "#{config[:scheme]}.row_cache.hit_rate", m[8], @timestamp
251
+ end
239
252
  end
240
253
  end
241
254
 
@@ -335,7 +348,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
335
348
  # - a line preceeded by 1 tab contains keyspace metrics
336
349
  # - a line preceeded by 2 tabs contains column family metrics
337
350
  def parse_cfstats
338
- def get_metric(string) # rubocop:disable NestedMethodDefinition
351
+ def get_metric(string) # rubocop:disable Lint/NestedMethodDefinition
339
352
  string.strip!
340
353
  (metric, value) = string.split(': ')
341
354
  if metric.nil? || value.nil? # rubocop:disable Style/GuardClause
@@ -350,6 +363,7 @@ class CassandraMetrics < Sensu::Plugin::Metric::CLI::Graphite
350
363
  # some versions of nodetool omit the '.' following the 'ms' unit.
351
364
  value = value.chomp(' ms.').chomp(' ms')
352
365
  end
366
+
353
367
  [metric, value]
354
368
  end
355
369
 
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SensuPluginsCassandra
2
4
  module Version
3
- MAJOR = 2
4
- MINOR = 1
5
+ MAJOR = 3
6
+ MINOR = 0
5
7
  PATCH = 0
6
8
 
7
9
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sensu-plugins-cassandra/version'
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.1.0
4
+ version: 3.0.0
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: 2019-03-05 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: english
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.3
19
+ version: 0.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.6.3
26
+ version: 0.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sensu-plugin
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.2'
33
+ version: '4.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.2'
40
+ version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.7'
47
+ version: '2.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.7'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: codeclimate-test-reporter
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.4'
61
+ version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.4'
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: github-markup
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '12.3'
103
+ version: '13.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '12.3'
110
+ version: '13.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: redcarpet
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.51.0
145
+ version: 0.81.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.51.0
152
+ version: 0.81.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: yard
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -203,14 +203,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - ">="
205
205
  - !ruby/object:Gem::Version
206
- version: 2.1.0
206
+ version: '2.3'
207
207
  required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  requirements:
209
209
  - - ">="
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubygems_version: 3.0.3
213
+ rubyforge_project:
214
+ rubygems_version: 2.7.7
214
215
  signing_key:
215
216
  specification_version: 4
216
217
  summary: Sensu plugins for the Cassandra NoSQL database server