sensu-plugins-megaraid 0.0.7 → 0.0.8

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: 0b92d4ef1207c1052cd3887740f6d009315b6ea6
4
- data.tar.gz: 2bea76fec98e2762a5a04a7ba4a0380004b78486
3
+ metadata.gz: 96dacba4909eb1ca028fbe81192b2e8d6257664c
4
+ data.tar.gz: 9ca523a6bb922560b69debe313e5db9e3d77102f
5
5
  SHA512:
6
- metadata.gz: 2b54c954dfd1b5b784d4f5c74207cb5954991236eb7b1997a35c1aceae96c17e184c0ffc013a128ec44c71e0a419d12ebf26171f7152fbcc092b03fcd13a7581
7
- data.tar.gz: f19519284c34f9060efc8917e5643b0fb38c40c35ab9c3dbf4bafefc9b5aab3208c17a2fdf0f9ef0abf96147590901e1b676abf6acfbadedd672e337ed7ec46b
6
+ metadata.gz: 37bd3e38ab2893507840eef59136318150775c600c2ed96be2e29dddd2ee7d49e74b3ce90652f502131caa6f7eb37b1ad232f21043138d4169fc26628bd4a950
7
+ data.tar.gz: 679e62f2204e9812cb8da4c7ea8cb6f5133bfaec12638a28e6cb09b74c8cb78e16e227d02d6dbd29ab11534c2859e5ace0e733f3dedd4e53707ee0e364dfa3fc
@@ -73,9 +73,9 @@ class CheckMegaRAID < Sensu::Plugin::Check::CLI
73
73
 
74
74
  def get_controllers()
75
75
  data = JSON.parse(%x[#{config[:storcli_cmd]} show J].chomp)
76
- if data.has_key?('Controllers')
76
+ begin
77
77
  data['Controllers'][0]['Response Data']['System Overview'].map { |i| i['Ctl'] }
78
- else
78
+ rescue
79
79
  []
80
80
  end
81
81
  end
@@ -194,7 +194,7 @@ class CheckMegaRAID < Sensu::Plugin::Check::CLI
194
194
  warning if config[:warn]
195
195
  critical
196
196
  else
197
- if @controllers
197
+ if @controllers.size > 0
198
198
  ok "All controllers (#{@controllers.keys.join(', ')}) are healthy"
199
199
  else
200
200
  ok "No MegaRAID devices detected"
@@ -2,7 +2,7 @@ module SensuPluginsMegaRAID
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-megaraid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti