mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-09-26 03:08:39 +02:00
(plugin) storage::purestorage::flasharray::v2::restapi - fix illegal divsion by zero (#4565)
This commit is contained in:
parent
e557d62e6a
commit
92693dc6ae
@ -196,15 +196,18 @@ sub manage_selection {
|
|||||||
name => $item->{name},
|
name => $item->{name},
|
||||||
reduction => {
|
reduction => {
|
||||||
data => $item->{space}->{data_reduction}
|
data => $item->{space}->{data_reduction}
|
||||||
},
|
}
|
||||||
space => {
|
};
|
||||||
|
|
||||||
|
if ($item->{provisioned} > 0) {
|
||||||
|
$self->{volumes}->{ $item->{name} }->{space} = {
|
||||||
total => $item->{provisioned},
|
total => $item->{provisioned},
|
||||||
used => $item->{space}->{total_physical},
|
used => $item->{space}->{total_physical},
|
||||||
free => $item->{provisioned} - $item->{space}->{total_physical},
|
free => $item->{provisioned} - $item->{space}->{total_physical},
|
||||||
prct_used => $item->{space}->{total_physical} * 100 / $item->{provisioned},
|
prct_used => $item->{space}->{total_physical} * 100 / $item->{provisioned},
|
||||||
prct_free => (100 - ($item->{space}->{total_physical} * 100 / $item->{provisioned}))
|
prct_free => (100 - ($item->{space}->{total_physical} * 100 / $item->{provisioned}))
|
||||||
}
|
};
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $perf (@$perfs) {
|
foreach my $perf (@$perfs) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user