sensu-plugins-redis 2.4.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: 21ee163d20baee0f248d8085a48d8511f2dc4e2799458167f50c81d796183e1c
4
- data.tar.gz: 7238e21603f96a50a0ef9b7f22090cf4b9a2b0f7783fd2a493ac2f8756dcab53
3
+ metadata.gz: 883f9d315c6dd7a2f6bea0c088534e5b5a7ef0581b34a218e7888d6cdcb85d7c
4
+ data.tar.gz: 8bf3f0f0549608197dddb8f8ef3281cefd9667428429bf3e2194ca27494908ca
5
5
  SHA512:
6
- metadata.gz: b901997098d32faac012e28ff3cac03e3d124c857c54cd063020c5b41f7d54cd8ec6b02d03990002e3a2cbca07271a1f1b924aa395774ff78499e1e018c39b84
7
- data.tar.gz: 507e5d1e1c6e3947faba2d7be759778b7b1281e37ab8787957fad2d4ad3ba6cbaf900ffcbfcc7979bf9e0c56a7fe08586e34b0e2fd7b739a5cb1ad744846d6ac
6
+ metadata.gz: f97c12d895e837f6adc4e569a9aa9d456d86fd4f32dc838ef7d2f2660376764d49a469cab3b3d426c599420c7107ae033b5979a7ae45b88e6eccf98fe43584ff
7
+ data.tar.gz: 13e5e3f0d472ae442b4fc0652d24bfa2da57a5d7062d108c6715753e5d8c3d0d0c9e604fd7b4193a1288d42653ac5ffff4df65da3f729d1b0481c98efa40636a
data/CHANGELOG.md CHANGED
@@ -6,10 +6,19 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.0.0] - 2018-03-17
10
+ ### Security
11
+ - updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses)
12
+
13
+ ### Breaking Changes
14
+ - removed ruby `< 2.1` support (@majormoses)
15
+
16
+ ### Changed
17
+ - appeased the cops (@majormoses)
18
+
9
19
  ## [2.4.0] - 2018-03-14
10
20
  ### Added
11
21
  - check-redis-connections-available.rb: checks the number of connections available (@nishiki)
12
-
13
22
  ## [2.3.2] - 2017-12-21
14
23
  ### Fixed
15
24
  - locked `development_dependency` of `mixlib-shellout` on to fix ruby 2.1 support (@majormoses)
@@ -136,6 +145,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
136
145
  - initial release
137
146
 
138
147
  [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.4.0...HEAD
148
+ [3.0.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.4.0...3.0.0
139
149
  [2.4.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.3.2...2.4.0
140
150
  [2.3.2]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.3.1...2.3.2
141
151
  [2.3.1]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.3.0...2.3.1
@@ -57,8 +57,7 @@ class RedisConnectionsAvailable < Sensu::Plugin::Check::CLI
57
57
  else
58
58
  ok "There are #{conn_available} connections available (#{clients}/#{maxclients})"
59
59
  end
60
-
61
- rescue
60
+ rescue StandardError
62
61
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
63
62
  end
64
63
  end
@@ -45,7 +45,7 @@ class RedisSlaveCheck < Sensu::Plugin::Check::CLI
45
45
  else
46
46
  critical "Redis #{config[:redis_info_key]} is #{redis.info.fetch(config[:redis_info_key].to_s)}!"
47
47
  end
48
- rescue
48
+ rescue StandardError
49
49
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
50
50
  end
51
51
  end
@@ -49,7 +49,7 @@ class RedisKeysCheck < Sensu::Plugin::Check::CLI
49
49
  else
50
50
  ok "Redis list #{config[:pattern]} length is above thresholds"
51
51
  end
52
- rescue
52
+ rescue StandardError
53
53
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
54
54
  end
55
55
  end
@@ -57,7 +57,7 @@ class RedisListLengthCheck < Sensu::Plugin::Check::CLI
57
57
  else
58
58
  ok "Redis list #{config[:key]} length (#{length}) is below thresholds"
59
59
  end
60
- rescue
60
+ rescue StandardError
61
61
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
62
62
  end
63
63
  end
@@ -57,7 +57,7 @@ class RedisChecks < Sensu::Plugin::Check::CLI
57
57
 
58
58
  redis_info = redis.info
59
59
  max_memory = redis_info.fetch('maxmemory', 0).to_i
60
- if max_memory == 0
60
+ if max_memory.zero?
61
61
  max_memory = redis_info.fetch('total_system_memory', system_memory).to_i
62
62
  end
63
63
  memory_in_use = redis_info.fetch('used_memory').to_i.fdiv(1024) # used memory in KB (KiloBytes)
@@ -73,7 +73,7 @@ class RedisChecks < Sensu::Plugin::Check::CLI
73
73
  else
74
74
  ok "Redis memory usage: #{used_memory}% is below defined limits"
75
75
  end
76
- rescue
76
+ rescue StandardError
77
77
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
78
78
  end
79
79
  end
@@ -42,7 +42,7 @@ class RedisChecks < Sensu::Plugin::Check::CLI
42
42
  else
43
43
  ok "Redis memory usage: #{used_memory}KB is below defined limits"
44
44
  end
45
- rescue
45
+ rescue StandardError
46
46
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
47
47
  end
48
48
  end
@@ -1,5 +1,5 @@
1
1
  #! /usr/bin/env ruby
2
- # encoding: UTF-8
2
+
3
3
  # <script name>
4
4
  #
5
5
  # DESCRIPTION:
@@ -40,7 +40,7 @@ class RedisPing < Sensu::Plugin::Check::CLI
40
40
  else
41
41
  critical 'Redis did not respond to the ping command'
42
42
  end
43
- rescue
43
+ rescue StandardError
44
44
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
45
45
  end
46
46
  end
@@ -24,7 +24,7 @@ class RedisSlaveCheck < Sensu::Plugin::Check::CLI
24
24
  end
25
25
  rescue KeyError
26
26
  critical "Redis server on #{redis_endpoint} is not master and does not have master_link_status"
27
- rescue
27
+ rescue StandardError
28
28
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
29
29
  end
30
30
  end
@@ -88,13 +88,13 @@ class Redis2Graphite < Sensu::Plugin::Metric::CLI::Graphite
88
88
 
89
89
  # Loop thru commandstats entries for perf metrics
90
90
  redis.info('commandstats').each do |k, v|
91
- %w(calls usec_per_call usec).each do |x|
91
+ %w[calls usec_per_call usec].each do |x|
92
92
  output "#{config[:scheme]}.commandstats.#{k}.#{x}", v[x]
93
93
  end
94
94
  end
95
95
 
96
96
  ok
97
- rescue
97
+ rescue StandardError
98
98
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
99
99
  end
100
100
  end
@@ -34,7 +34,7 @@ class RedisListLengthMetric < Sensu::Plugin::Metric::CLI::Graphite
34
34
  output "#{config[:scheme]}.#{key}.items", redis.llen(key)
35
35
  end
36
36
  ok
37
- rescue
37
+ rescue StandardError
38
38
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
39
39
  end
40
40
  end
@@ -72,7 +72,7 @@ module RedisClientOptions
72
72
  long: '--conn-failure-status EXIT_STATUS',
73
73
  description: 'Returns the following exit status for Redis connection failures',
74
74
  default: 'critical',
75
- in: %w(unknown warning critical)
75
+ in: %w[unknown warning critical]
76
76
 
77
77
  option :timeout,
78
78
  short: '-t TIMEOUT',
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsRedis
2
2
  module Version
3
- MAJOR = 2
4
- MINOR = 4
3
+ MAJOR = 3
4
+ MINOR = 0
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.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: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2018-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -190,14 +190,14 @@ dependencies:
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: 0.40.0
193
+ version: 0.51.0
194
194
  type: :development
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
198
  - - "~>"
199
199
  - !ruby/object:Gem::Version
200
- version: 0.40.0
200
+ version: 0.51.0
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: serverspec
203
203
  requirement: !ruby/object:Gem::Requirement
@@ -295,7 +295,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
296
  - - ">="
297
297
  - !ruby/object:Gem::Version
298
- version: 2.0.0
298
+ version: 2.1.0
299
299
  required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  requirements:
301
301
  - - ">="