elesai 0.9.2 → 0.9.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.
- data/lib/elesai/cli.rb +14 -7
- data/lib/elesai/version.rb +1 -1
- metadata +2 -2
data/lib/elesai/cli.rb
CHANGED
|
@@ -188,12 +188,14 @@ module Elesai
|
|
|
188
188
|
end
|
|
189
189
|
|
|
190
190
|
@lsi.bbus.each do |bbu|
|
|
191
|
+
|
|
191
192
|
[:voltage, :temperature, :learncyclestatus].each do |attr|
|
|
192
193
|
unless bbu[:firmwarestatus][attr] == 'OK'
|
|
193
194
|
plugin_output += " [BBU:#{bbu._id}:#{attr}:#{bbu[:firmwarestatus][attr]}]"
|
|
194
195
|
plugin_status = :warning if plugin_status == ""
|
|
195
196
|
end
|
|
196
197
|
end
|
|
198
|
+
|
|
197
199
|
[:batterypackmissing, :batteryreplacementrequired].each do |attr|
|
|
198
200
|
unless bbu[:firmwarestatus][attr] == 'No'
|
|
199
201
|
plugin_output += " [BBU:#{attr}:#{bbu[:firmwarestatus][attr]}]"
|
|
@@ -202,14 +204,19 @@ module Elesai
|
|
|
202
204
|
end
|
|
203
205
|
|
|
204
206
|
if bbu[:batterytype] == 'iBBU'
|
|
205
|
-
if bbu[:
|
|
207
|
+
if bbu[:firmwarestatus][:learncycleactive] == 'Yes'
|
|
206
208
|
plugin_output += " [BBU:absolutestateofcharge:#{bbu[:gasgaugestatus][:absolutestateofcharge]}]"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
else
|
|
210
|
+
if bbu[:firmwarestatus][:chargingstatus] == 'None'
|
|
211
|
+
if bbu[:gasgaugestatus][:absolutestateofcharge].number <= 65
|
|
212
|
+
plugin_output += " [BBU:absolutestateofcharge:#{bbu[:gasgaugestatus][:absolutestateofcharge]}]"
|
|
213
|
+
plugin_status = :warning if plugin_status == ""
|
|
214
|
+
end
|
|
215
|
+
if bbu[:capacityinfo][:remainingcapacity].number <= bbu[:capacityinfo][:remainingcapacityalarm].number
|
|
216
|
+
plugin_output += " [BBU:remainingcapacity:#{bbu[:capacityinfo][:remainingcapacityalarm]}]"
|
|
217
|
+
plugin_status = :warning if plugin_status == ""
|
|
218
|
+
end
|
|
219
|
+
end
|
|
213
220
|
end
|
|
214
221
|
end
|
|
215
222
|
end
|
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.9.
|
|
4
|
+
version: 0.9.3
|
|
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: 2012-11-
|
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: workflow
|