sensu-plugins-memory-checks 3.1.1 → 3.1.2

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
- SHA1:
3
- metadata.gz: db85b632d9bdb38bc83d3c7b3083bd49592a1a14
4
- data.tar.gz: 7fa43c23d1fa44bbd6c052c917e7824f96a1fd32
2
+ SHA256:
3
+ metadata.gz: 49239b496c250ec7633778ddec0abc5da8341d8ccc4a8787586bdd21a872640b
4
+ data.tar.gz: 39a62472674a226a35e88069c0fe2d88406e50b1c6f07b33a0d974c53662a67d
5
5
  SHA512:
6
- metadata.gz: 6396c87b11b9137b7929a8eb6e4527566801fec573795f6e61bf21e5ccfefb5cecdb889b8eac56473e385eabbdaf6014152c25fad6d645cc33ef171487fc5a13
7
- data.tar.gz: ead6a65b68768c5b0f7740d27eccc43ecedca200af99e56013551510ef762abfd66234cdc3ce7fc6664f15bb0e87aca0e3a4ed9fa5a9d5935422b16e7add1553
6
+ metadata.gz: 066eafc312a002318c9f6e013f51ffb3c1158429472469baabb0126ee5f01de7490fc025ca9c53b2ba9e27eed1a1e3b289e296a441b8f913df4ea1c006c420c0
7
+ data.tar.gz: 8415c039c8128c65a809fadbe21a28702c318256d26d9a3a3991a7a1cbcf0b1379526cdc918bedc85339054649fb8323b4dae270b021cdca388254adb59a0a7d
@@ -5,6 +5,14 @@ This CHANGELOG follows the located [here](https://github.com/sensu-plugins/commu
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [3.1.2] - 2018-03-07
9
+
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
+ ### Changed
14
+ - appeased the cops (@majormoses)
15
+
8
16
  ## [3.1.1] - 2017-10-25
9
17
  ### Fixed
10
18
  - check-memory-percent.sh: compare variable `$os` rather than the string 'os' (@lcc207)
@@ -130,11 +138,12 @@ This CHANGELOG follows the located [here](https://github.com/sensu-plugins/commu
130
138
  ### Added
131
139
  - initial release
132
140
 
133
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.0...HEAD
141
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.2...HEAD
142
+ [3.1.2]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.1...3.1.2
134
143
  [3.1.1]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.0...3.1.1
135
144
  [3.1.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.0.1...3.1.0
136
145
  [3.0.2]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.0.1...3.0.2
137
- [3.0.1]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.0.0...3.0.1
146
+ [3.0.1]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.0.0...3.0.1
138
147
  [3.0.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/2.1.0...3.0.0
139
148
  [2.1.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/2.0.0...2.1.0
140
149
  [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/1.0.2...2.0.0
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- bin_dir = File.expand_path(File.dirname(__FILE__))
3
+ bin_dir = File.expand_path(__dir__)
4
4
  shell_script_path = File.join(bin_dir, File.basename($PROGRAM_NAME, '.rb') + '.sh')
5
5
 
6
6
  exec shell_script_path, *ARGV, unsetenv_others: true
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- bin_dir = File.expand_path(File.dirname(__FILE__))
3
+ bin_dir = File.expand_path(__dir__)
4
4
  shell_script_path = File.join(bin_dir, File.basename($PROGRAM_NAME, '.rb') + '.sh')
5
5
 
6
6
  exec shell_script_path, *ARGV, unsetenv_others: true
@@ -1,5 +1,4 @@
1
1
  #! /usr/bin/env ruby
2
- # encoding: UTF-8
3
2
  #
4
3
  # check-ram
5
4
  #
@@ -94,7 +93,8 @@ class CheckRAM < Sensu::Plugin::Check::CLI
94
93
  # free_ram is returned in Bytes. see: https://github.com/threez/ruby-vmstat/blob/master/lib/vmstat/memory.rb
95
94
  free_ram /= 1024 * 1024
96
95
  used_ram /= 1024 * 1024
97
- total_ram /= 1024 * 1024
96
+ # false positive
97
+ total_ram /= 1024 * 1024 # rubocop:disable Lint/UselessAssignment
98
98
  if config[:free]
99
99
  ram = free_ram
100
100
  message "#{ram} megabytes of RAM left"
@@ -1,5 +1,4 @@
1
1
  #! /usr/bin/env ruby
2
- # encoding: UTF-8
3
2
  #
4
3
  # Checks SWAP usage as a % of the total swap
5
4
  #
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- bin_dir = File.expand_path(File.dirname(__FILE__))
3
+ bin_dir = File.expand_path(__dir__)
4
4
  shell_script_path = File.join(bin_dir, File.basename($PROGRAM_NAME, '.rb') + '.sh')
5
5
 
6
6
  exec shell_script_path, *ARGV
@@ -17,7 +17,7 @@ LANG=C
17
17
 
18
18
  # get arguments
19
19
 
20
- # #RED
20
+ # #RED
21
21
  while getopts 'w:c:hp' OPT; do
22
22
  case $OPT in
23
23
  w) WARN=$OPTARG;;
@@ -1,5 +1,4 @@
1
1
  #! /usr/bin/env ruby
2
- # encoding: UTF-8
3
2
  #
4
3
  # metrics-memory-percent
5
4
  #
@@ -80,7 +79,7 @@ class MemoryGraphite < Sensu::Plugin::Metric::CLI::Graphite
80
79
  mem['swapTotal']
81
80
  end
82
81
 
83
- mem.each do |k, _v|
82
+ mem.each_key do |k|
84
83
  # with percentages, used and free are exactly complementary
85
84
  # no need to have both
86
85
  # the one to drop here is "used" because "free" will
@@ -1,5 +1,4 @@
1
1
  #! /usr/bin/env ruby
2
- # encoding: UTF-8
3
2
  #
4
3
  # metrics-memory
5
4
  #
@@ -2,7 +2,7 @@ module SensuPluginsMemoryChecks
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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: 3.1.1
4
+ version: 3.1.2
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-10-26 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -109,33 +109,33 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '3.2'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rubocop
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.40.0
117
+ version: '3.4'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.40.0
124
+ version: '3.4'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec
126
+ name: rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '3.4'
131
+ version: 0.51.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.4'
138
+ version: 0.51.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: vmstat
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  version: '0'
223
223
  requirements: []
224
224
  rubyforge_project:
225
- rubygems_version: 2.6.14
225
+ rubygems_version: 2.7.6
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: Sensu plugins for checking memory