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 +5 -5
- data/CHANGELOG.md +6 -1
- data/bin/check-hardware-fail.rb +3 -3
- data/lib/sensu-plugins-hardware/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3b0808938e170d4f1c1c5d5d0800f71244799bb078b4d7fa393bb84deb40f93b
|
4
|
+
data.tar.gz: aa3f027ae6110b8b7f8a6670b631d33f1f8e87157d230e097f4dca26c7470b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38409723515a4b590f3faac6f6866b0b7218947b83106e550cfac36c733cff32e7d3e8c735f948fa5423207eabd6372bd60963b3779124abed442fbc77b0d7bd
|
7
|
+
data.tar.gz: 35f506342c62ad47eeb9f69f5e4e51e469faf3356a9e941f0cf00e365e9827b6823c3d220598ba2ca21e0558cd3caaafe79ea275160c97b7f158142b7a45cb00
|
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.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.
|
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
|
data/bin/check-hardware-fail.rb
CHANGED
@@ -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
|
-
|
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: #{
|
60
|
+
critical "Problem Detected: #{output[0]}" if output.any?
|
61
61
|
ok 'OK'
|
62
62
|
end
|
63
63
|
end
|
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.
|
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-
|
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.
|
195
|
+
rubygems_version: 2.7.0
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Sensu plugins for physical hardware
|