sensu-plugins-redis 1.1.1 → 1.2.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/bin/check-redis-memory-percentage.rb +6 -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: 32aaab200fa89a0df1f2e96d0f25049835aec207
|
4
|
+
data.tar.gz: 1fd27f8c0897e82bf96d9d41d63ce8804a542995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28eebc5ad7bccc2cf71ad5f8bd75fc510f4a75c961a51247b24652e60ee7d07f22a8cd266db4757c8f7f0db324145084d36fd423a2534f927b30e9788c9195da
|
7
|
+
data.tar.gz: dbbe5fc58e0c466c296d5e6be4f0c9fdc20497087a92971c75efbadd9dabadbb1f55605ac6fd6854682d70df87e59a66c18f34e53cfe87d0aad541d442fb308b
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
## [1.2.0] - 2017-05-09
|
8
|
+
### Changed
|
9
|
+
- check-redis-memory-percentage: Handle case where maxmemory is 0 (@stevenviola)
|
10
|
+
|
7
11
|
## [1.1.1] - 2017-05-05
|
8
12
|
### Fixed
|
9
13
|
- updated gemspec to avoid deprecation warnings in redis client for Fixnum
|
@@ -52,7 +56,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
52
56
|
### Added
|
53
57
|
- initial release
|
54
58
|
|
55
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.
|
59
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.2.0...HEAD
|
60
|
+
[1.2.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.1.0...1.2.0
|
56
61
|
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/1.0.0...1.1.0
|
57
62
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/0.1.0...1.0.0
|
58
63
|
[0.1.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/0.0.4...0.1.0
|
@@ -80,8 +80,12 @@ class RedisChecks < Sensu::Plugin::Check::CLI
|
|
80
80
|
redis = Redis.new(options)
|
81
81
|
|
82
82
|
redis_info = redis.info
|
83
|
-
|
84
|
-
|
83
|
+
max_memory = redis_info.fetch('maxmemory', 0).to_i
|
84
|
+
if max_memory == 0
|
85
|
+
max_memory = redis_info.fetch('total_system_memory', system_memory).to_i
|
86
|
+
end
|
87
|
+
memory_in_use = redis_info.fetch('used_memory').to_i.fdiv(1024) # used memory in KB (KiloBytes)
|
88
|
+
total_memory = max_memory.fdiv(1024) # max memory (if specified) in KB
|
85
89
|
|
86
90
|
used_memory = ((memory_in_use / total_memory) * 100).round(2)
|
87
91
|
warn_memory = config[:warn_mem]
|
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.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-05-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|