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 +4 -4
- data/CHANGELOG.md +5 -1
- data/bin/check-megaraid.rb +8 -6
- data/lib/sensu-plugins-megaraid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3d3d14d950dd3f5ec537f1640b12a80dba84d1a
|
4
|
+
data.tar.gz: 907733cf01bac17af4dbb6c23fe1ae4b89f1bebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
-
|
14
|
+
- Join on hash keys
|
11
15
|
|
12
16
|
## [0.0.2] - 2015-12-28
|
13
17
|
### Added
|
data/bin/check-megaraid.rb
CHANGED
@@ -104,9 +104,10 @@ class CheckMegaRAID < Sensu::Plugin::Check::CLI
|
|
104
104
|
end
|
105
105
|
|
106
106
|
controller['virtualdisks'].each do |vd|
|
107
|
-
|
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 #{
|
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 #{
|
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
|
-
|
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 #{
|
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 #{
|
134
|
+
send_ok(check_name, "Controller #{id} PD #{pd_name} is healthy")
|
133
135
|
end
|
134
136
|
end
|
135
137
|
|