sensu-plugins-redis 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95d40c387c2be3a670542ee8f85b998469e838d8
4
- data.tar.gz: d0fdeb6f6cc01353cda70684f3b60c9c2661401b
3
+ metadata.gz: 0d1204be18c161361774b000328f479cb21485f1
4
+ data.tar.gz: 242aa214c4fc3c257c8f55879e1d22fe37db458f
5
5
  SHA512:
6
- metadata.gz: 6dd2060d15cf3ae5fbbaddf3253f08a8081cd0c28fc026e502cc698595c3a59cc5ce6405256a9f58f2327da87c8d9a5bbe953a151e338c2a2ebab75e56d5d173
7
- data.tar.gz: fceb1b85ed10ebd82a85d9ad4fb5e6fca317404df8b439c7cc48610748845eee93c33186d8b7765ae5998ad21dac6b0c68f034708c20176a47623e92494cedd2
6
+ metadata.gz: c5ad7b9d190e2e6cc7e224dfdc08040dfab0ac1e2cf28f2c1648b24d7a1f428307636c5a4bcfbd79245e5bb8c026b5bed2a8304880ef2faf69d965c34d1ac8a8
7
+ data.tar.gz: 96c1dc2018738a6d472b59d551d591372b06bca02c4c6e744f9e999b04a3ee988be83562142fb5ba1b955391569a189cc8fe3322efdc2687b680fa92f4019010
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.2.0] - 2017-09-09
9
+ ### Added
10
+ - All check scripts have a new option of `--timeout` (@empyrean987)
11
+
8
12
  ## [2.1.0] - 2017-08-17
9
13
  ### Added
10
14
  - metrics-redis-llen.rb config option to choose db (@athal7)
@@ -102,7 +106,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
102
106
  ### Added
103
107
  - initial release
104
108
 
105
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.1.0...HEAD
109
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.2.0...HEAD
110
+ [2.2.0]:https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.1.0...2.2.0
106
111
  [2.1.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.0.1...2.1.0
107
112
  [2.0.1]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/2.0.0...2.0.1
108
113
  [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.4.0...2.0.0
@@ -66,11 +66,18 @@ class RedisSlaveCheck < Sensu::Plugin::Check::CLI
66
66
  default: 'unknown',
67
67
  in: %w(unknown warning critical)
68
68
 
69
+ option :timeout,
70
+ short: '-t TIMEOUT',
71
+ long: '--timeout TIMEOUT',
72
+ description: 'Redis connection timeout',
73
+ required: false,
74
+ default: 5
75
+
69
76
  def run
70
77
  options = if config[:socket]
71
78
  { path: socket }
72
79
  else
73
- { host: config[:host], port: config[:port] }
80
+ { host: config[:host], port: config[:port], timeout: config[:timeout] }
74
81
  end
75
82
 
76
83
  options[:password] = config[:password] if config[:password]
@@ -74,11 +74,18 @@ class RedisKeysCheck < Sensu::Plugin::Check::CLI
74
74
  default: 'unknown',
75
75
  in: %w(unknown warning critical)
76
76
 
77
+ option :timeout,
78
+ short: '-t TIMEOUT',
79
+ long: '--timeout TIMEOUT',
80
+ description: 'Redis connection timeout',
81
+ required: false,
82
+ default: 5
83
+
77
84
  def run
78
85
  options = if config[:socket]
79
86
  { path: socket }
80
87
  else
81
- { host: config[:host], port: config[:port] }
88
+ { host: config[:host], port: config[:port], timeout: config[:timeout] }
82
89
  end
83
90
 
84
91
  options[:db] = config[:database]
@@ -75,11 +75,18 @@ class RedisListLengthCheck < Sensu::Plugin::Check::CLI
75
75
  default: 'unknown',
76
76
  in: %w(unknown warning critical)
77
77
 
78
+ option :timeout,
79
+ short: '-t TIMEOUT',
80
+ long: '--timeout TIMEOUT',
81
+ description: 'Redis connection timeout',
82
+ required: false,
83
+ default: 5
84
+
78
85
  def run
79
86
  options = if config[:socket]
80
87
  { path: config[:socket] }
81
88
  else
82
- { host: config[:host], port: config[:port] }
89
+ { host: config[:host], port: config[:port], timeout: config[:timeout] }
83
90
  end
84
91
 
85
92
  options[:db] = config[:database]
@@ -76,6 +76,13 @@ class RedisChecks < Sensu::Plugin::Check::CLI
76
76
  default: 'unknown',
77
77
  in: %w(unknown warning critical)
78
78
 
79
+ option :timeout,
80
+ short: '-t TIMEOUT',
81
+ long: '--timeout TIMEOUT',
82
+ description: 'Redis connection timeout',
83
+ required: false,
84
+ default: 5
85
+
79
86
  def system_memory
80
87
  `awk '/MemTotal/{print$2}' /proc/meminfo`.to_f * 1024
81
88
  end
@@ -84,7 +91,7 @@ class RedisChecks < Sensu::Plugin::Check::CLI
84
91
  options = if config[:socket]
85
92
  { path: socket }
86
93
  else
87
- { host: config[:host], port: config[:port] }
94
+ { host: config[:host], port: config[:port], timeout: config[:timeout] }
88
95
  end
89
96
 
90
97
  options[:password] = config[:password] if config[:password]
@@ -58,11 +58,18 @@ class RedisChecks < Sensu::Plugin::Check::CLI
58
58
  default: 'unknown',
59
59
  in: %w(unknown warning critical)
60
60
 
61
+ option :timeout,
62
+ short: '-t TIMEOUT',
63
+ long: '--timeout TIMEOUT',
64
+ description: 'Redis connection timeout',
65
+ required: false,
66
+ default: 5
67
+
61
68
  def run
62
69
  options = if config[:socket]
63
70
  { path: socket }
64
71
  else
65
- { host: config[:host], port: config[:port] }
72
+ { host: config[:host], port: config[:port], timeout: config[:timeout] }
66
73
  end
67
74
 
68
75
  options[:password] = config[:password] if config[:password]
@@ -63,6 +63,13 @@ class RedisPing < Sensu::Plugin::Check::CLI
63
63
  default: 'critical',
64
64
  in: %w(unknown warning critical)
65
65
 
66
+ option :timeout,
67
+ short: '-t TIMEOUT',
68
+ long: '--timeout TIMEOUT',
69
+ description: 'Redis connection timeout',
70
+ required: false,
71
+ default: 5
72
+
66
73
  def redis_options
67
74
  if config[:socket]
68
75
  {
@@ -73,7 +80,8 @@ class RedisPing < Sensu::Plugin::Check::CLI
73
80
  {
74
81
  host: config[:host],
75
82
  port: config[:port],
76
- password: config[:password]
83
+ password: config[:password],
84
+ timeout: config[:timeout]
77
85
  }
78
86
  end
79
87
  end
@@ -38,11 +38,18 @@ class RedisSlaveCheck < Sensu::Plugin::Check::CLI
38
38
  default: 'unknown',
39
39
  in: %w(unknown warning critical)
40
40
 
41
+ option :timeout,
42
+ short: '-t TIMEOUT',
43
+ long: '--timeout TIMEOUT',
44
+ description: 'Redis connection timeout',
45
+ required: false,
46
+ default: 5
47
+
41
48
  def run
42
49
  options = if config[:socket]
43
50
  { path: socket }
44
51
  else
45
- { host: config[:host], port: config[:port] }
52
+ { host: config[:host], port: config[:port], timeout: config[:timeout] }
46
53
  end
47
54
 
48
55
  options[:password] = config[:password] if config[:password]
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsRedis
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 1
4
+ MINOR = 2
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.1.0
4
+ version: 2.2.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: 2017-08-18 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  version: '0'
225
225
  requirements: []
226
226
  rubyforge_project:
227
- rubygems_version: 2.4.5
227
+ rubygems_version: 2.6.13
228
228
  signing_key:
229
229
  specification_version: 4
230
230
  summary: Sensu plugins for working with redis