mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
B #1484: Do not nul CPU usage if cloudwatch doesn't return value
This commit is contained in:
parent
009ca508b8
commit
98f6fe5849
@ -831,7 +831,7 @@ private
|
||||
if cpu[:datapoints].size != 0
|
||||
cpu = cpu[:datapoints][-1][:average]
|
||||
else
|
||||
cpu = 0
|
||||
cpu = onevm["MONITORING/CPU"] || 0
|
||||
end
|
||||
cpu = cpu.to_f.round(2).to_s
|
||||
rescue => e
|
||||
|
Loading…
Reference in New Issue
Block a user