sensu-plugins-ipmi-sensors 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 089ad99f64eb12371d689a57d8035e7a11e972cf
4
- data.tar.gz: ff006120c18464e698b04bc0e283de856278e533
3
+ metadata.gz: d07de86df6635f700d0237b0ce77805df361a351
4
+ data.tar.gz: 870a689f88b16e0c5125141bf2de864ab991f4a6
5
5
  SHA512:
6
- metadata.gz: 67f39a6e10feb0e7bc78938a3563544ad5aada8a15a6f59e7bbaf65abfbe46a0036608e8bc37ae3a41ec280e124054c67104121d41911206264221bb1eeb545b
7
- data.tar.gz: cf1d6dc581440b437a274e6c545f4315d7ebf1c5175039a43eb32c43cdf6afc210e77577f58ae12eca271476b7e08a82b5a1118596aafec40dd557671a349011
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
- ## Unreleased
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>
@@ -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}", "handler" => config[:handler]}
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}", "handler" => config[:handler]}
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}", "handler" => config[:handler]}
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}", "handler" => config[:handler]}
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
 
@@ -2,7 +2,7 @@ module SensuPluginsIPMISensors
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
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-ipmi-sensors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
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: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin