sensu-plugins-hardware 1.1.0 → 1.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
- SHA1:
3
- metadata.gz: ec6fc7437d99045ad6597bccfb65c1cd7741a326
4
- data.tar.gz: 53c98ddd65cc5a7c1e1240bca0680135247b027c
2
+ SHA256:
3
+ metadata.gz: 3b0808938e170d4f1c1c5d5d0800f71244799bb078b4d7fa393bb84deb40f93b
4
+ data.tar.gz: aa3f027ae6110b8b7f8a6670b631d33f1f8e87157d230e097f4dca26c7470b0c
5
5
  SHA512:
6
- metadata.gz: 4a92fb5d6832dbbc241bf75c3ead01cdf30b34e3f40ee5defedc6c6506a12846cb1ed6d6044b5cf2342c655c3a6c917e9b7ae627a1e6ded06e7c39a5dba3496b
7
- data.tar.gz: 09766fe5a187addb0e4e30c649ff833eddd34f90919d005a9b7eddd120345c807c1ae1ce86799e0efc41ef399e2086acbed034fbc80e3327459eb65cd0d00c11
6
+ metadata.gz: 38409723515a4b590f3faac6f6866b0b7218947b83106e550cfac36c733cff32e7d3e8c735f948fa5423207eabd6372bd60963b3779124abed442fbc77b0d7bd
7
+ data.tar.gz: 35f506342c62ad47eeb9f69f5e4e51e469faf3356a9e941f0cf00e365e9827b6823c3d220598ba2ca21e0558cd3caaafe79ea275160c97b7f158142b7a45cb00
@@ -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.2.0] - 2017-11-02
9
+ ### Changed
10
+ - check-hardware-fail.rb: Return the actual and entire query line match if found (@phantasm66)
11
+
8
12
  ## [1.1.0] - 2017-07-17
9
13
  ### Added
10
14
  - Option to limit the number of lines to be parsed from the dmesg output
@@ -40,7 +44,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
40
44
  ### Changed
41
45
  - removed cruft from /lib
42
46
 
43
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.1.0...HEAD
47
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.2.0...HEAD
48
+ [1.2.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.1.0...1.2.0
44
49
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.0.0...1.1.0
45
50
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/0.0.4...1.0.0
46
51
  [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/0.0.3...0.0.4
@@ -41,7 +41,7 @@ class CheckHardwareFail < Sensu::Plugin::Check::CLI
41
41
  short: '-q QUERY',
42
42
  long: '--query QUERY',
43
43
  default: 'Hardware Error',
44
- description: 'What to look for in the output of dmesg'
44
+ description: 'What pattern to look for in the output of dmesg (regex or literal)'
45
45
 
46
46
  option :invert,
47
47
  long: '--invert',
@@ -51,13 +51,13 @@ class CheckHardwareFail < Sensu::Plugin::Check::CLI
51
51
 
52
52
  def run
53
53
  cmd = config[:invert] ? 'head' : 'tail'
54
- errors = if config[:lines] == 0
54
+ output = if config[:lines].zero?
55
55
  `dmesg`.lines.select { |l| l[/#{config[:query]}/] }
56
56
  else
57
57
  `dmesg | #{cmd} -n #{config[:lines]}`.lines.select { |l| l[/#{config[:query]}/] }
58
58
  end
59
59
  unknown 'Command execution failed!' unless $CHILD_STATUS.success?
60
- critical "Problem Detected: #{config[:query]}" if errors.any?
60
+ critical "Problem Detected: #{output[0]}" if output.any?
61
61
  ok 'OK'
62
62
  end
63
63
  end
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsHardware
2
2
  module Version
3
3
  MAJOR = 1
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-hardware
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
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-07-17 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
- rubygems_version: 2.4.5
195
+ rubygems_version: 2.7.0
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: Sensu plugins for physical hardware