elesai 0.10.5 → 0.10.11
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.
- data/lib/elesai/action/check.rb +23 -12
- data/lib/elesai/action/show.rb +1 -1
- data/lib/elesai/version.rb +1 -1
- metadata +2 -2
data/lib/elesai/action/check.rb
CHANGED
@@ -38,8 +38,8 @@ module Elesai; module Action
|
|
38
38
|
drive_plugin_string = "[PD:#{physicaldrive._id}:#{physicaldrive[:size]}:#{physicaldrive[:mediatype]}:#{physicaldrive[:pdtype]}]"
|
39
39
|
unless physicaldrive[:firmwarestate].state == :online or physicaldrive[:firmwarestate].state == :hotspare
|
40
40
|
plugin_output += " #{drive_plugin_string}:#{physicaldrive[:firmwarestate].state}"
|
41
|
-
plugin_status = :critical if physicaldrive[:firmwarestate] == :failed
|
42
|
-
plugin_status = :warning if plugin_status
|
41
|
+
plugin_status = :critical if physicaldrive[:firmwarestate].state == :failed
|
42
|
+
plugin_status = :warning if physicaldrive[:firmwarestate].state == :rebuild and plugin_status != :critical
|
43
43
|
end
|
44
44
|
unless physicaldrive[:mediaerrorcount].to_i < 10
|
45
45
|
plugin_output += " #{drive_plugin_string}:MediaError:#{physicaldrive[:mediaerrorcount]}"
|
@@ -53,19 +53,30 @@ module Elesai; module Action
|
|
53
53
|
|
54
54
|
@lsi.virtualdrives.each do |vd|
|
55
55
|
vd_plugin_string = "[VD:#{vd._id}]"
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
case vd[:state]
|
57
|
+
when :offline, :failed
|
58
|
+
plugin_output += " #{vd_plugin_string}:#{vd[:state]}"
|
59
|
+
plugin_status = :critical
|
60
|
+
when :partialdegraded, :degraded
|
61
|
+
plugin_output += " #{vd_plugin_string}:#{vd[:state]}"
|
62
|
+
plugin_status = :warning if plugin_status != :critical
|
63
|
+
when :optimal
|
64
|
+
a = 1
|
65
|
+
else
|
66
|
+
plugin_status = :unknown
|
67
|
+
plugin_output += " #{vd_plugin_string}:#{vd[:state]}"
|
59
68
|
end
|
60
69
|
end
|
61
70
|
|
62
71
|
@lsi.bbus.each do |bbu|
|
63
72
|
|
64
|
-
[:temperature
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
73
|
+
unless bbu[:firmwarestatus][:temperature] == 'OK'
|
74
|
+
plugin_output += " [BBU:#{bbu._id}:temperature:#{bbu[:firmwarestatus][:temperature]}:#{bbu[:temperature].gsub(/\s/,'')}]"
|
75
|
+
end
|
76
|
+
|
77
|
+
unless bbu[:firmwarestatus][:learncyclestatus] == 'OK'
|
78
|
+
plugin_output += " [BBU:#{bbu._id}:learncyclestatus:#{bbu[:firmwarestatus][:learncyclestatus]}]"
|
79
|
+
plugin_status = :warning if plugin_status == ""
|
69
80
|
end
|
70
81
|
|
71
82
|
[:batterypackmissing, :batteryreplacementrequired].each do |attr|
|
@@ -80,11 +91,11 @@ module Elesai; module Action
|
|
80
91
|
plugin_output += " learn cycle enabled: [BBU:absolutestateofcharge:#{bbu[:gasgaugestatus][:absolutestateofcharge]}]"
|
81
92
|
else
|
82
93
|
unless bbu[:firmwarestatus][:voltage] == 'OK'
|
83
|
-
plugin_output += " [BBU:#{bbu._id}:#{
|
94
|
+
plugin_output += " [BBU:#{bbu._id}:voltage:#{bbu[:firmwarestatus][:voltage]}]"
|
84
95
|
plugin_status = :warning if plugin_status == ""
|
85
96
|
end
|
86
97
|
if bbu[:firmwarestatus][:chargingstatus] == 'None' or bbu[:gasgaugestatus][:discharging] == 'No'
|
87
|
-
if bbu[:gasgaugestatus][:absolutestateofcharge].number <=
|
98
|
+
if bbu[:gasgaugestatus][:absolutestateofcharge].number <= 50
|
88
99
|
plugin_output += " [BBU:absolutestateofcharge:#{bbu[:gasgaugestatus][:absolutestateofcharge]}]"
|
89
100
|
plugin_status = :warning if plugin_status == ""
|
90
101
|
end
|
data/lib/elesai/action/show.rb
CHANGED
@@ -14,7 +14,7 @@ module Elesai; module Action
|
|
14
14
|
opts = OptionParser.new
|
15
15
|
opts.banner = "Usage: #{ID} [options] show <component>"
|
16
16
|
opts.separator ""
|
17
|
-
opts.separator " <component> is physicaldisk|pd, virtualdisk|vd, bbu"
|
17
|
+
opts.separator " <component> is adapter, physicaldisk|pd, virtualdisk|vd, bbu"
|
18
18
|
opts.order!(@arguments)
|
19
19
|
|
20
20
|
options_valid?
|
data/lib/elesai/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elesai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: workflow
|