fix rubrik (#2332)
This commit is contained in:
parent
cb5b393f6e
commit
2ed3388508
|
@ -133,11 +133,7 @@ sub manage_selection {
|
|||
$self->{clusters} = {
|
||||
$name => {
|
||||
name => $name,
|
||||
status => $status->{status},
|
||||
read => 0,
|
||||
write => 0,
|
||||
read_iops => 0,
|
||||
write_iops => 0
|
||||
status => $status->{status}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -147,10 +143,12 @@ sub manage_selection {
|
|||
)) {
|
||||
my $count = 0;
|
||||
foreach (@{$io_stats->{ $entry->[0] }->{ $entry->[1] }}) {
|
||||
$self->{clusters}->{$name}->{ $entry->[2] } = 0
|
||||
if (!defined($self->{clusters}->{$name}->{ $entry->[2] }));
|
||||
$self->{clusters}->{$name}->{ $entry->[2] } += $_->{stat};
|
||||
$count++;
|
||||
}
|
||||
$self->{clusters}->{$name}->{ $entry->[2] } = int($self->{clusters}->{$name}->{ $entry->[2] } / $count);
|
||||
$self->{clusters}->{$name}->{ $entry->[2] } = int($self->{clusters}->{$name}->{ $entry->[2] } / $count) if ($count > 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,8 +139,8 @@ sub manage_selection {
|
|||
};
|
||||
foreach (@{$disks->{data}}) {
|
||||
my $id = $_->{nodeId} . ':' . $_->{id};
|
||||
next if (defined($options{filter_disk_id}) && $options{filter_disk_id} ne '' &&
|
||||
$id !~ /$options{filter_disk_id}/);
|
||||
next if (defined($self->{option_results}->{filter_disk_id}) && $self->{option_results}->{filter_disk_id} ne '' &&
|
||||
$id !~ /$self->{option_results}->{filter_disk_id}/);
|
||||
|
||||
$self->{clusters}->{$name}->{disks}->{$id} = {
|
||||
id => $id,
|
||||
|
|
|
@ -138,8 +138,8 @@ sub manage_selection {
|
|||
}
|
||||
};
|
||||
foreach (@{$nodes->{data}}) {
|
||||
next if (defined($options{filter_node_id}) && $options{filter_node_id} ne '' &&
|
||||
$_->{id} !~ /$options{filter_node_id}/);
|
||||
next if (defined($self->{option_results}->{filter_node_id}) && $self->{option_results}->{filter_node_id} ne '' &&
|
||||
$_->{id} !~ /$self->{option_results}->{filter_node_id}/);
|
||||
|
||||
$self->{clusters}->{$name}->{nodes}->{ $_->{id} } = {
|
||||
id => $_->{id},
|
||||
|
|
Loading…
Reference in New Issue