sensu-plugins-ipmi-sensors 0.0.2 → 0.0.3
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/README.md +3 -0
- data/bin/check-ipmi-sensors.rb +10 -4
- data/lib/sensu-plugins-ipmi-sensors/version.rb +1 -1
- 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: d07de86df6635f700d0237b0ce77805df361a351
|
4
|
+
data.tar.gz: 870a689f88b16e0c5125141bf2de864ab991f4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10eb3be182e22296833a154ca3e99e9dd4676da09c0905d530065786b1ee9b5631441d1491e3908013aa3a2cb83e7cfd9b34a97bd3de468b4b99abf729eaffa7
|
7
|
+
data.tar.gz: 3e767444c04746b871962671fbd207dfa1ad3644303b59b9856e7d8fd08fab995237e82e180454915f50932caf1c6de31460901c9a7433ae3bdd28bc228800d2
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
-
##
|
6
|
+
## [0.0.3] - 2016-01-14
|
7
|
+
### Added
|
8
|
+
- Added --handlers command line option
|
7
9
|
|
8
10
|
## [0.0.1] - 2015-12-29
|
9
11
|
### Added
|
@@ -12,3 +14,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
12
14
|
## [0.0.1] - 2015-12-28
|
13
15
|
### Added
|
14
16
|
- Initial release
|
17
|
+
|
18
|
+
## Unreleased
|
19
|
+
|
data/README.md
CHANGED
@@ -12,6 +12,7 @@ The plugin accepts the following command line options:
|
|
12
12
|
```
|
13
13
|
Usage: check-ipmi-sensors.rb (options)
|
14
14
|
--driver <driver> IPMI driver (default: auto)
|
15
|
+
--handlers <HANDLERS> Comma separated list of handlers
|
15
16
|
-H, --host <HOST> IPMI host (default: localhost)
|
16
17
|
--ignore-sensor <SENSOR> Comma separated list of IPMI sensors to ignore
|
17
18
|
--ignore-sensor-regex <SENSOR>
|
@@ -24,5 +25,7 @@ Usage: check-ipmi-sensors.rb (options)
|
|
24
25
|
-w, --warn Warn instead of throwing a critical failure
|
25
26
|
```
|
26
27
|
|
28
|
+
Use the --handlers command line option to specify which handlers you want to use for the generated events.
|
29
|
+
|
27
30
|
## Author
|
28
31
|
Matteo Cerutti - <matteo.cerutti@hotmail.co.uk>
|
data/bin/check-ipmi-sensors.rb
CHANGED
@@ -65,6 +65,12 @@ class CheckIPMISensors < Sensu::Plugin::Check::CLI
|
|
65
65
|
:proc => proc { |a| a.split(',') },
|
66
66
|
:default => []
|
67
67
|
|
68
|
+
option :handlers,
|
69
|
+
:description => "Comma separated list of handlers",
|
70
|
+
:long => "--handlers <HANDLER>",
|
71
|
+
:proc => proc { |s| s.split(',') },
|
72
|
+
:default => []
|
73
|
+
|
68
74
|
option :warn,
|
69
75
|
:description => "Warn instead of throwing a critical failure",
|
70
76
|
:short => "-w",
|
@@ -82,22 +88,22 @@ class CheckIPMISensors < Sensu::Plugin::Check::CLI
|
|
82
88
|
end
|
83
89
|
|
84
90
|
def send_ok(check_name, msg)
|
85
|
-
event = {"name" => check_name, "status" => 0, "output" => "OK: #{msg}", "
|
91
|
+
event = {"name" => check_name, "status" => 0, "output" => "#{self.class.name} OK: #{msg}", "handlers" => config[:handlers]}
|
86
92
|
send_client_socket(event.to_json)
|
87
93
|
end
|
88
94
|
|
89
95
|
def send_warning(check_name, msg)
|
90
|
-
event = {"name" => check_name, "status" => 1, "output" => "WARNING: #{msg}", "
|
96
|
+
event = {"name" => check_name, "status" => 1, "output" => "#{self.class.name} WARNING: #{msg}", "handlers" => config[:handlers]}
|
91
97
|
send_client_socket(event.to_json)
|
92
98
|
end
|
93
99
|
|
94
100
|
def send_critical(check_name, msg)
|
95
|
-
event = {"name" => check_name, "status" => 2, "output" => "CRITICAL: #{msg}", "
|
101
|
+
event = {"name" => check_name, "status" => 2, "output" => "#{self.class.name} CRITICAL: #{msg}", "handlers" => config[:handlers]}
|
96
102
|
send_client_socket(event.to_json)
|
97
103
|
end
|
98
104
|
|
99
105
|
def send_unknown(check_name, msg)
|
100
|
-
event = {"name" => check_name, "status" => 3, "output" => "UNKNOWN: #{msg}", "
|
106
|
+
event = {"name" => check_name, "status" => 3, "output" => "#{self.class.name} UNKNOWN: #{msg}", "handlers" => config[:handlers]}
|
101
107
|
send_client_socket(event.to_json)
|
102
108
|
end
|
103
109
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-ipmi-sensors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Cerutti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|