Merge pull request #897 from cgagnaire/fix-redis-restapi
fix hashes deref on all redis restapi modes
This commit is contained in:
commit
44fd0b2902
|
@ -251,7 +251,7 @@ sub manage_selection {
|
||||||
my $persistent_storage_size = 0;
|
my $persistent_storage_size = 0;
|
||||||
my $ephemeral_storage_size = 0;
|
my $ephemeral_storage_size = 0;
|
||||||
my $bigstore_size = 0;
|
my $bigstore_size = 0;
|
||||||
foreach my $node (keys $result3) {
|
foreach my $node (keys %{$result3}) {
|
||||||
if (defined($result3->{$node}->{total_memory})) {
|
if (defined($result3->{$node}->{total_memory})) {
|
||||||
$total_memory = $total_memory + $result3->{$node}->{total_memory};
|
$total_memory = $total_memory + $result3->{$node}->{total_memory};
|
||||||
}
|
}
|
||||||
|
|
|
@ -476,7 +476,7 @@ sub manage_selection {
|
||||||
my $result = $options{custom}->get(path => '/v1/bdbs/stats/last?interval='.$options{custom}->get_interval());
|
my $result = $options{custom}->get(path => '/v1/bdbs/stats/last?interval='.$options{custom}->get_interval());
|
||||||
my $result2 = $options{custom}->get(path => '/v1/bdbs');
|
my $result2 = $options{custom}->get(path => '/v1/bdbs');
|
||||||
|
|
||||||
foreach my $database (keys $result) {
|
foreach my $database (keys %{$result}) {
|
||||||
if (defined($self->{option_results}->{filter_database}) && $self->{option_results}->{filter_database} ne '' &&
|
if (defined($self->{option_results}->{filter_database}) && $self->{option_results}->{filter_database} ne '' &&
|
||||||
$database !~ /$self->{option_results}->{filter_database}/) {
|
$database !~ /$self->{option_results}->{filter_database}/) {
|
||||||
$self->{output}->output_add(long_msg => "skipping database '" . $database . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping database '" . $database . "': no matching filter.", debug => 1);
|
||||||
|
|
|
@ -333,7 +333,7 @@ sub manage_selection {
|
||||||
my $result = $options{custom}->get(path => '/v1/nodes/stats/last?interval='.$options{custom}->get_interval());
|
my $result = $options{custom}->get(path => '/v1/nodes/stats/last?interval='.$options{custom}->get_interval());
|
||||||
my $result2 = $options{custom}->get(path => '/v1/nodes');
|
my $result2 = $options{custom}->get(path => '/v1/nodes');
|
||||||
|
|
||||||
foreach my $node (keys $result) {
|
foreach my $node (keys %{$result}) {
|
||||||
if (defined($self->{option_results}->{filter_node}) && $self->{option_results}->{filter_node} ne '' &&
|
if (defined($self->{option_results}->{filter_node}) && $self->{option_results}->{filter_node} ne '' &&
|
||||||
$node !~ /$self->{option_results}->{filter_node}/) {
|
$node !~ /$self->{option_results}->{filter_node}/) {
|
||||||
$self->{output}->output_add(long_msg => "skipping node '" . $node . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping node '" . $node . "': no matching filter.", debug => 1);
|
||||||
|
|
|
@ -357,7 +357,7 @@ sub manage_selection {
|
||||||
my $result = $options{custom}->get(path => '/v1/shards/stats/last?interval='.$options{custom}->get_interval());
|
my $result = $options{custom}->get(path => '/v1/shards/stats/last?interval='.$options{custom}->get_interval());
|
||||||
my $result2 = $options{custom}->get(path => '/v1/shards');
|
my $result2 = $options{custom}->get(path => '/v1/shards');
|
||||||
|
|
||||||
foreach my $shard (keys $result) {
|
foreach my $shard (keys %{$result}) {
|
||||||
if (defined($self->{option_results}->{filter_shard}) && $self->{option_results}->{filter_shard} ne '' &&
|
if (defined($self->{option_results}->{filter_shard}) && $self->{option_results}->{filter_shard} ne '' &&
|
||||||
$shard !~ /$self->{option_results}->{filter_shard}/) {
|
$shard !~ /$self->{option_results}->{filter_shard}/) {
|
||||||
$self->{output}->output_add(long_msg => "skipping shard '" . $shard . "': no matching filter.", debug => 1);
|
$self->{output}->output_add(long_msg => "skipping shard '" . $shard . "': no matching filter.", debug => 1);
|
||||||
|
|
Loading…
Reference in New Issue