sensu-plugins-memory-checks 2.0.0 → 2.1.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 +4 -4
- data/CHANGELOG.md +7 -2
- data/bin/check-ram.rb +5 -1
- data/lib/sensu-plugins-memory-checks/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 614f7bdc2d20b63f8705a4148dd00a6d922ca53b
|
4
|
+
data.tar.gz: 809ffdc76014e4b877bdfe11dbb52a0fd1fc2393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03dfb83c2f898d2c6c60d396ddebe6fea2d02e49c93fb6adc69724c8b0f571aefc7f7410373feb1a2846e64afec1dcce4e54b1ec9c31df36273fb1a7a7919ccc
|
7
|
+
data.tar.gz: b122f99e53ff866ad4cfbe3bcf84375751ee1c9a8171d0cffa73d4a8d40adb16d50e7be8bfeca40e85eb90de4ea12e7516d75eea90a78de27bc1b02ab1b27232
|
data/CHANGELOG.md
CHANGED
@@ -5,9 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [2.1.0] - 2017-03-08
|
9
|
+
### Changed
|
10
|
+
- `check-ram-rb`: to better address Linux users expecting free ram to not include buffer cache we bumped to a new version of vmstat to get the new functionality. As this is not installed you must manually install `2.3.0`. This will use the field `MemAvailable` in `/proc/meminfo`. It maintains its backwards compatibility to keep existing behavior. (@majormoses)
|
11
|
+
|
8
12
|
## [2.0.0] - 2017-01-17
|
9
13
|
### Breaking Changes
|
10
|
-
- The hardcoded default thresholds of 90% warn 95% critical in `check-ram.rb` when using the `--used` option
|
14
|
+
- The hardcoded default thresholds of 90% warn 95% critical in `check-ram.rb` when using the `--used` option
|
11
15
|
have been removed so custom thresholds can be passed. To obtain identical behavior configure the check
|
12
16
|
like `check-ram.rb --used -w 90 -c 95`.
|
13
17
|
- Ruby < 2.1 is no longer supported
|
@@ -92,7 +96,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
92
96
|
### Added
|
93
97
|
- initial release
|
94
98
|
|
95
|
-
[unreleased]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/2.
|
99
|
+
[unreleased]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/2.1.0...HEAD
|
100
|
+
[2.1.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/2.0.0...2.1.0
|
96
101
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/1.0.2...2.0.0
|
97
102
|
[1.0.2]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/1.0.1...1.0.2
|
98
103
|
[1.0.1]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/1.0.0...1.0.1
|
data/bin/check-ram.rb
CHANGED
@@ -77,7 +77,11 @@ class CheckRAM < Sensu::Plugin::Check::CLI
|
|
77
77
|
|
78
78
|
# calculating free and used ram based on: https://github.com/threez/ruby-vmstat/issues/4 to emulate free -m
|
79
79
|
mem = Vmstat.snapshot.memory
|
80
|
-
|
80
|
+
begin
|
81
|
+
free_ram = mem.available_bytes
|
82
|
+
rescue NoMethodError
|
83
|
+
free_ram = mem.inactive_bytes + mem.free_bytes
|
84
|
+
end
|
81
85
|
used_ram = mem.wired_bytes + mem.active_bytes
|
82
86
|
total_ram = mem.total_bytes
|
83
87
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-memory-checks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.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-
|
11
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.
|
145
|
+
version: 2.3.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: 2.
|
152
|
+
version: 2.3.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|