sensu-plugins-megaraid 0.0.3 → 0.0.4

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
2
  SHA1:
3
- metadata.gz: b54346860fcf403c5bbd4f028544ebd65ff7b6a0
4
- data.tar.gz: 117d83db4fcc0f0b8e308532faa019cca93a992b
3
+ metadata.gz: c3d3d14d950dd3f5ec537f1640b12a80dba84d1a
4
+ data.tar.gz: 907733cf01bac17af4dbb6c23fe1ae4b89f1bebb
5
5
  SHA512:
6
- metadata.gz: 133b365b8ca8a49033b57bb793d2e2d249888956e2bbf29b3fa99884172030bd116fa9b7ebc88e1b7607a6d6d65a934d50b2334d6caaa820d9a095508fcd29b6
7
- data.tar.gz: 997dd8508c00bbf368043a794a5010631cc41f3fc1fd4b9fd34876613a9f61ca89ac2613ea3faec6e95d1af83ac549b6479e76be754c98a711999295eb07ad77
6
+ metadata.gz: f1cf1ef2be946df8abde0ce6729e49f839b3d5bf4a6060b56f90ff9e086542955ac72ec7d0ebd9d91545a77082fa405f9bdfb3efef9a37a76ca3920a0779ded7
7
+ data.tar.gz: 95feba4af628cddeb6b73b56998eda9cc40aa0b125de18550c8b2ee70cb59e4f836a211aa366182dcd76dfa57c131f51fa7660f8aa7336c408c84b819ee18916
data/CHANGELOG.md CHANGED
@@ -5,9 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## [0.0.4] - 2015-12-29
9
+ ### Added
10
+ - Normalizing VD and PD names
11
+
8
12
  ## [0.0.2] - 2015-12-29
9
13
  ### Added
10
- - join on hash keys
14
+ - Join on hash keys
11
15
 
12
16
  ## [0.0.2] - 2015-12-28
13
17
  ### Added
@@ -104,9 +104,10 @@ class CheckMegaRAID < Sensu::Plugin::Check::CLI
104
104
  end
105
105
 
106
106
  controller['virtualdisks'].each do |vd|
107
- check_name = "megaraid-ctl_#{id}-vd_#{vd['DG/VD']}-state"
107
+ vd_name = vd['DG/VD'].gsub('/', '_')
108
+ check_name = "megaraid-ctl_#{id}-vd_#{vd_name}-state"
108
109
  if vd['State'].downcase != "optl"
109
- msg = "Controller #{id} VD #{vd['DG/VD']} is not healthy (Status: #{vd['State']})"
110
+ msg = "Controller #{id} VD #{vd_name} is not healthy (Status: #{vd['State']})"
110
111
  if config[:warn]
111
112
  send_warning(check_name, msg)
112
113
  else
@@ -114,14 +115,15 @@ class CheckMegaRAID < Sensu::Plugin::Check::CLI
114
115
  end
115
116
  problems += 1
116
117
  else
117
- send_ok(check_name, "Controller #{id} VD #{vd['DG/VD']} is healthy")
118
+ send_ok(check_name, "Controller #{id} VD #{vd_name} is healthy")
118
119
  end
119
120
  end
120
121
 
121
122
  controller['physicaldisks'].each do |pd|
122
- check_name = "megaraid-ctl_#{id}-pd_#{pd['EID:Slt']}-state"
123
+ pd_name = pd['EID:Slt'].gsub(':', '_')
124
+ check_name = "megaraid-ctl_#{id}-pd_#{pd_name}-state"
123
125
  if pd['State'].downcase != "onln"
124
- msg = "Controller #{id} PD #{pd['EID:Slt']} is not healthy (Status: #{pd['State']})"
126
+ msg = "Controller #{id} PD #{pd_name} is not healthy (Status: #{pd['State']})"
125
127
  if config[:warn]
126
128
  send_warning(check_name, msg)
127
129
  else
@@ -129,7 +131,7 @@ class CheckMegaRAID < Sensu::Plugin::Check::CLI
129
131
  end
130
132
  problems += 1
131
133
  else
132
- send_ok(check_name, "Controller #{id} PD #{pd['EID:Slt']} is healthy")
134
+ send_ok(check_name, "Controller #{id} PD #{pd_name} is healthy")
133
135
  end
134
136
  end
135
137
 
@@ -2,7 +2,7 @@ module SensuPluginsMegaRAID
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 4
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti