Only gather info about online nodes
This commit is contained in:
parent
c146554291
commit
ffe8c6b0a5
|
@ -28,8 +28,9 @@ if ($cluster){
|
|||
foreach my $item (@{$cluster}){
|
||||
if ($item->{type} eq 'cluster'){
|
||||
$json->{status}->{$_} = $item->{$_} foreach (qw(quorate nodes name version));
|
||||
} elsif ($item->{type} eq 'node'){
|
||||
} elsif ($item->{type} eq 'node' and $item->{online}){
|
||||
push @nodes, $item->{name};
|
||||
} elsif ($item->{type} eq 'node'){
|
||||
$json->{status}->{all_online} = 0 unless ($item->{online});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user