sensu-plugins-redis 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +0 -1
- data/bin/check-redis-list-length.rb +9 -2
- data/lib/sensu-plugins-redis/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd85ed962f2d4ad9b17984f5b347567b501323f8
|
4
|
+
data.tar.gz: fc2352c0eeea0effc4af1c8701206372e5655202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d69a0960c67f8bb9e168d1c737d53bb3be169fdd83e641a8b4cf7a4b36d2f22a4286c9d47073da2090edf2640deee823d4856b3cd0863e1684b4e60ff3c11441
|
7
|
+
data.tar.gz: 43226f41e13daa2b72f6d9c9e2c34740e707cd56530e41688d60afa21888bd953674b786d1234cebdd4f273ad28dff38b7ba9865b3a60af411087824ff0cdf54
|
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
|
+
## [1.4.0] - 2017-06-24
|
9
|
+
### Added
|
10
|
+
- check-redis-list-length.rb support more datatypes to check (@nevins-b)
|
11
|
+
|
8
12
|
## [1.3.1] - 2017-05-31
|
9
13
|
### Fixed
|
10
14
|
- metrics-redis-graphite: fix commandstats output (@boutetnico)
|
@@ -75,7 +79,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
75
79
|
### Added
|
76
80
|
- initial release
|
77
81
|
|
78
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.
|
82
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.4.0...HEAD
|
83
|
+
[1.4.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.3.1...1.4.0
|
79
84
|
[1.3.1]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.3.0...1.3.1
|
80
85
|
[1.3.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.2.2...1.3.0
|
81
86
|
[1.2.2]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.2.1...1.2.2
|
data/README.md
CHANGED
@@ -80,14 +80,21 @@ class RedisListLengthCheck < Sensu::Plugin::Check::CLI
|
|
80
80
|
options[:password] = config[:password] if config[:password]
|
81
81
|
redis = Redis.new(options)
|
82
82
|
|
83
|
-
length = redis.
|
83
|
+
length = case redis.type(config[:key])
|
84
|
+
when 'hash'
|
85
|
+
redis.hlen(config[:key])
|
86
|
+
when 'set'
|
87
|
+
redis.scard(config[:key])
|
88
|
+
else
|
89
|
+
redis.llen(config[:key])
|
90
|
+
end
|
84
91
|
|
85
92
|
if length >= config[:crit]
|
86
93
|
critical "Redis list #{config[:key]} length is above the CRITICAL limit: #{length} length / #{config[:crit]} limit"
|
87
94
|
elsif length >= config[:warn]
|
88
95
|
warning "Redis list #{config[:key]} length is above the WARNING limit: #{length} length / #{config[:warn]} limit"
|
89
96
|
else
|
90
|
-
ok "Redis list #{config[:key]} length is below thresholds"
|
97
|
+
ok "Redis list #{config[:key]} length (#{length}) is below thresholds"
|
91
98
|
end
|
92
99
|
rescue
|
93
100
|
unknown "Could not connect to Redis server on #{config[:host]}:#{config[:port]}"
|
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: 1.
|
4
|
+
version: 1.4.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-06-
|
11
|
+
date: 2017-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|