diff --git a/cloud/aws/apigateway/mode/latency.pm b/cloud/aws/apigateway/mode/latency.pm index 144a9257b..9df684f66 100644 --- a/cloud/aws/apigateway/mode/latency.pm +++ b/cloud/aws/apigateway/mode/latency.pm @@ -150,11 +150,14 @@ sub manage_selection { ); foreach my $metric (@{$self->{aws_metrics}}) { foreach my $statistic (@{$self->{aws_statistics}}) { - next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed})); + next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) + && !defined($self->{option_results}->{zeroed})); + $self->{metrics}->{$instance}->{display} = $instance; $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic; - $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? - $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; + $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = + defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? + $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; } } } diff --git a/cloud/aws/apigateway/mode/requests.pm b/cloud/aws/apigateway/mode/requests.pm index 8cc59b134..9fb4bc2d9 100644 --- a/cloud/aws/apigateway/mode/requests.pm +++ b/cloud/aws/apigateway/mode/requests.pm @@ -152,12 +152,14 @@ sub manage_selection { foreach my $metric (@{$self->{aws_metrics}}) { foreach my $statistic (@{$self->{aws_statistics}}) { - next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed})); + next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) + && !defined($self->{option_results}->{zeroed})); $self->{metrics}->{$instance}->{display} = $instance; - $self->{metrics}->{$instance}->{availability_zone} = $self->{option_results}->{availability_zone}; $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic; - $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; + $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = + defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? + $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; } } } diff --git a/cloud/aws/kinesis/mode/recordsstats.pm b/cloud/aws/kinesis/mode/recordsstats.pm index 20e7a9251..90d4f7e2d 100644 --- a/cloud/aws/kinesis/mode/recordsstats.pm +++ b/cloud/aws/kinesis/mode/recordsstats.pm @@ -190,12 +190,16 @@ sub manage_selection { ); foreach my $metric (@{$self->{aws_metrics}}) { foreach my $statistic (@{$self->{aws_statistics}}) { - next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed}) - || defined($metrics_mapping{$metric}->{stats}->{lc($statistic)}) && $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false"); + next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) + && !defined($self->{option_results}->{zeroed}) + || defined($metrics_mapping{$metric}->{stats}->{lc($statistic)}) + && $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false"); + $self->{metrics}->{$instance}->{display} = $instance; - $self->{metrics}->{$instance}->{availability_zone} = $self->{option_results}->{availability_zone}; $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic; - $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; + $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = + defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? + $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; } } } diff --git a/cloud/aws/kinesis/mode/streams.pm b/cloud/aws/kinesis/mode/streams.pm index c1fbf484d..40dcf4396 100644 --- a/cloud/aws/kinesis/mode/streams.pm +++ b/cloud/aws/kinesis/mode/streams.pm @@ -166,12 +166,16 @@ sub manage_selection { ); foreach my $metric (@{$self->{aws_metrics}}) { foreach my $statistic (@{$self->{aws_statistics}}) { - next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed}) - || defined($metrics_mapping{$metric}->{stats}->{lc($statistic)}) && $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false"); + next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) + && !defined($self->{option_results}->{zeroed}) + || defined($metrics_mapping{$metric}->{stats}->{lc($statistic)}) + && $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false"); + $self->{metrics}->{$instance}->{display} = $instance; - $self->{metrics}->{$instance}->{availability_zone} = $self->{option_results}->{availability_zone}; $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic; - $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; + $self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = + defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? + $metric_results{$instance}->{$metric}->{lc($statistic)} : 0; } } }