Only gather info about online nodes

This commit is contained in:
Daniel Berteaud 2018-06-04 23:29:27 +02:00
parent c146554291
commit ffe8c6b0a5

View File

@ -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});
}
}